Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2174 → Rev 2173

/branches/V0.88e_ACC-HH_HR_MartinR/Hex-Files/Flight-Ctrl_MEGA1284P_V0_88e_SVN2093_ACC-HH_DX7_20120831.hex
File deleted
/branches/V0.88e_ACC-HH_HR_MartinR/Hex-Files/Flight-Ctrl_MEGA1284P_V0_88e_SVN2093_ACC-HH_20120831.hex
File deleted
/branches/V0.88e_ACC-HH_HR_MartinR/Hex-Files/Flight-Ctrl_MEGA1284P_V0_88e_SVN2093_ACC-HH_DX8_20120831.hex
File deleted
/branches/V0.88e_ACC-HH_HR_MartinR/Hex-Files/Flight-Ctrl_MEGA644_V0_88e_SVN2093_ACC-HH_20120831.hex
File deleted
/branches/V0.88e_ACC-HH_HR_MartinR/capacity.c
72,6 → 72,11
Capacity.UsedCapacity = 0;
Capacity.ActualPower = 0;
Capacity.MinOfMaxPWM = 0;
#ifdef WITH_REMAINCAPACITY // only include functions if DEBUG is defined in main.h
 
#warning : "### with REMAIN CAPACITY ###"
Capacity.RemainCapacity = (Parameter_UserParam5*100);
#endif
update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL);
}
 
139,6 → 144,14
{
Capacity.UsedCapacity++; // we have one mAh more
SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part
#ifdef WITH_REMAINCAPACITY // only include functions if DEBUG is defined in main.h
 
#warning : "### with REMAIN CAPACITY ###"
Capacity.RemainCapacity=(Parameter_UserParam5*100)-Capacity.UsedCapacity; //Added by metro
if((Capacity.RemainCapacity<=0)&&(Capacity.RemainCapacity%10==0)&&(Parameter_UserParam5!=0)) beeptime = 1000;
if((Capacity.RemainCapacity<=500)&&(Capacity.RemainCapacity%100==0)&&(Parameter_UserParam5!=0)) beeptime = 10000;
#endif
}
} // EOF check delay update timer
}
/branches/V0.88e_ACC-HH_HR_MartinR/capacity.h
5,7 → 5,8
{
unsigned short ActualCurrent; // in 0.1A Steps
unsigned short ActualPower; // in 0.1W
unsigned short UsedCapacity; // in mAh
signed short UsedCapacity; // in mAh //Modified by metro
signed short RemainCapacity; // in mAh //Added by metro
unsigned char MinOfMaxPWM; // BL Power Limit
} __attribute__((packed)) Capacity_t;
 
/branches/V0.88e_ACC-HH_HR_MartinR/fc.c
68,8 → 68,8
 
unsigned short CurrentOffset = 0;///
 
unsigned char Motors[12]; //MartinR: Fehlersuche (war 8)
unsigned char Motorsmax[12]; //MartinR: Fehlersuche (war 8)
unsigned char Motors[8];
unsigned char Motorsmax[8];
unsigned short MotorsTmax;
unsigned char updatemotors=2;
 
259,9 → 259,6
DebugOut.Analog[24] = SollHoehe/5;
// DebugOut.Analog[22] = FromNaviCtrl_Value.GpsZ;
// DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay;
DebugOut.Analog[25] = FC_StatusFlags;// MartinR: Test
DebugOut.Analog[26] = FC_StatusFlags2;// MartinR: Test
DebugOut.Analog[27] = KompassSollWert;
DebugOut.Analog[29] = Capacity.MinOfMaxPWM;
DebugOut.Analog[30] = GPS_Nick;
1072,7 → 1069,7
StickGas = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 127;
 
GyroFaktor = (Parameter_Gyro_P + 10.0);
// IntegralFaktor = Parameter_Gyro_I; // MartinR: war mal hier
// IntegralFaktor = Parameter_Gyro_I; // MartinR: verschoben um Code zu sparen
GyroFaktorGier = (Parameter_Gyro_Gier_P + 10.0);
IntegralFaktorGier = Parameter_Gyro_Gier_I;
 
1115,8 → 1112,6
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Looping?
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#ifdef WITH_ACC_Loop // MartinR: deaktivieren um Code zu sparen
 
if((PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > EE_Parameter.LoopThreshold) && EE_Parameter.BitConfig & CFG_LOOP_LINKS) Looping_Links = 1;
else
{
1152,18 → 1147,15
 
if(Looping_Links || Looping_Rechts) Looping_Roll = 1; else Looping_Roll = 0;
if(Looping_Oben || Looping_Unten) { Looping_Nick = 1; Looping_Roll = 0; Looping_Links = 0; Looping_Rechts = 0;} else Looping_Nick = 0;
#endif
} // Ende neue Funken-Werte
#ifdef WITH_ACC_Loop // MartinR: deaktiviert um Code zu sparen
 
if(Looping_Roll || Looping_Nick)
{
if(GasMischanteil > EE_Parameter.LoopGasLimit) GasMischanteil = EE_Parameter.LoopGasLimit;
TrichterFlug = 1;
}
#else
#warning : "### without ACC-Loop ###"
#endif
 
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Bei Empfangsausfall im Flug
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1238,7 → 1230,7
}
if((EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) || (Parameter_UserParam1 > 49)) IntegralFaktor = 0; // MartinR geändert und verschoben
else IntegralFaktor = Parameter_Gyro_I; // MartinR: geändert
else IntegralFaktor = Parameter_Gyro_I; // MartinR: verschoben um Code zu sparen
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(!Looping_Nick && !Looping_Roll && (Aktuell_az > 512 || MotorenEin))
/branches/V0.88e_ACC-HH_HR_MartinR/fc.h
49,8 → 49,8
#define CHK_POTI_MM_OFF(b,a,min,max,off) {CHK_POTI_OFF(b,a,off); LIMIT_MIN_MAX(b, min, max);}
 
/// MartinW; added vars
extern unsigned char Motors[12]; //MartinR: sicherheitshalber geändert (war 8)
unsigned char Motorsmax[12]; //MartinR: sicherheitshalber geändert (war 8)
extern unsigned char Motors[8];
unsigned char Motorsmax[8];
unsigned short MotorsTmax;
extern unsigned char updatemotors;
extern unsigned char loop1, loop2, loop3;
/branches/V0.88e_ACC-HH_HR_MartinR/flight.pnproj
1,0 → 0,0
<Project name="Flight-Ctrl"><File path="uart.h"></File><File path="main.c"></File><File path="main.h"></File><File path="makefile"></File><File path="uart.c"></File><File path="printf_P.h"></File><File path="timer0.c"></File><File path="timer0.h"></File><File path="old_macros.h"></File><File path="twimaster.c"></File><File path="version.txt"></File><File path="twimaster.h"></File><File path="rc.c"></File><File path="rc.h"></File><File path="fc.h"></File><File path="menu.h"></File><File path="menu.c"></File><File path="_Settings.h"></File><File path="analog.c"></File><File path="analog.h"></File><File path="GPS.c"></File><File path="gps.h"></File><File path="License.txt"></File><File path="spi.h"></File><File path="spi.c"></File><File path="led.h"></File><File path="led.c"></File><File path="fc.c"></File><File path="mymath.c"></File><File path="mymath.h"></File><File path="isqrt.S"></File><File path="Spektrum.c"></File><File path="Spektrum.h"></File><File path="eeprom.h"></File><File path="eeprom.c"></File><File path="libfc.h"></File><File path="debug.c"></File><File path="debug.h"></File><File path="jetimenu.c"></File><File path="jetimenu.h"></File><File path="capacity.c"></File><File path="capacity.h"></File><File path="hottmenu.c"></File><File path="hottmenu.h"></File><File path="sbus.c"></File><File path="sbus.h"></File><File path="vector.h"></File><File path="user_receiver.h"></File><File path="user_receiver.c"></File></Project>
<Project name="Flight-Ctrl"><File path="uart.h"></File><File path="main.c"></File><File path="main.h"></File><File path="makefile"></File><File path="uart.c"></File><File path="printf_P.h"></File><File path="timer0.c"></File><File path="timer0.h"></File><File path="old_macros.h"></File><File path="twimaster.c"></File><File path="version.txt"></File><File path="twimaster.h"></File><File path="rc.c"></File><File path="rc.h"></File><File path="fc.h"></File><File path="menu.h"></File><File path="menu.c"></File><File path="_Settings.h"></File><File path="analog.c"></File><File path="analog.h"></File><File path="GPS.c"></File><File path="gps.h"></File><File path="License.txt"></File><File path="spi.h"></File><File path="spi.c"></File><File path="led.h"></File><File path="led.c"></File><File path="fc.c"></File><File path="mymath.c"></File><File path="mymath.h"></File><File path="isqrt.S"></File><File path="Spektrum.c"></File><File path="Spektrum.h"></File><File path="eeprom.h"></File><File path="eeprom.c"></File><File path="libfc.h"></File><File path="debug.c"></File><File path="debug.h"></File><File path="jetimenu.c"></File><File path="jetimenu.h"></File><File path="capacity.c"></File><File path="capacity.h"></File><File path="hottmenu.c"></File><File path="hottmenu.h"></File><File path="sbus.c"></File><File path="sbus.h"></File></Project>
/branches/V0.88e_ACC-HH_HR_MartinR/main.h
12,10 → 12,9
#define WITH_MKTOOL_Display
#define WITH_JETI_SIMULATION
#define WITH_ExternControl
#define WITH_ACC_Loop
#define WITH_FULL_ANALOG_TEXT
#define WITHSPECTRUM
//#define WITH_REMAINCAPACITY // MartinR: entfernt, da Konflikt mit Libfc
//#define WITH_REMAINCAPACITY
// #define WITH_PANOTRIGGER
#else
#endif
23,13 → 22,13
 
//#define WITH_MKTOOL_Display /// MartinW; with MKTool Display 70604-63130
//#define WITHSPECTRUM /// MartinW; memsave
//#define WITH_FULL_ANALOG_TEXT /// MartinW; memsave // MartinR: deaktiviert
//#define WITH_ExternControl /// MartinW; memsave // MartinR: deaktiviert
#define WITH_FULL_ANALOG_TEXT /// MartinW; memsave
#define WITH_ExternControl /// MartinW; memsave
//#define WITH_ORIGINAL_MOTORSMOOTHING /// MartinW; memsave 63312-63164
//#define WITH_JETI_SIMULATION /// MartinW; memsave 63312-63016 // MartinR: deaktiviert
//#define WITH_JETI_BEEP /// MartinW; 63072-63038; 63216-63050 // MartinR: deaktiviert
#define WITH_JETI_SIMULATION /// MartinW; memsave 63312-63016
#define WITH_JETI_BEEP /// MartinW; 63072-63038; 63216-63050
//#define WITH_PANOTRIGGER /// MartinW; 64336-64112
//#define WITH_HOTTMENU /// Metro; // MartinR: deaktiviert
#define WITH_HOTTMENU /// Metro;
//#define WITH_REMAINCAPACITY /// Metro;
 
 
/branches/V0.88e_ACC-HH_HR_MartinR/rc.c
122,14 → 122,14
PPM_in[index] = tmp;
}
index++;
if(PlatinenVersion < 20)
{
if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen
if(index == 6) J4High; else J4Low; // Servosignal an J4 anlegen
if(index == 7) J5High; else J5Low; // Servosignal an J5 anlegen
}
if(PlatinenVersion < 20)
{
if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen
if(index == 6) J4High; else J4Low; // Servosignal an J4 anlegen
if(index == 7) J5High; else J5Low; // Servosignal an J5 anlegen
}
}
}
}
}
else
{
/branches/V0.88e_ACC-HH_HR_MartinR/timer0.c
60,7 → 60,7
volatile unsigned int cntKompass = 0;
volatile unsigned int beeptime = 0;
volatile unsigned char SendSPI = 0, ServoActive = 0, CalculateServoSignals = 1;
uint16_t RemainingPulse = 255; // MartinR zur Sicherheit bei Interrupts
uint16_t RemainingPulse = 0;
volatile int16_t ServoNickOffset = (255 / 2) * MULTIPLYER * 16; // initial value near center positon
volatile int16_t ServoRollOffset = (255 / 2) * MULTIPLYER * 16; // initial value near center positon
volatile int16_t ServoPanOffset = (255 / 2) * MULTIPLYER * 16; // MartinR: für Pan-Funktion
361,6 → 361,7
 
if(PlatinenVersion < 20)
{
/* // MartinR : deaktiviert wegen Platzbedarf
//---------------------------
// Nick servo state machine
//---------------------------
386,6 → 387,7
// set pulse output active
PulseOutput = 1;
}
*/
} // EOF Nick servo state machine
else
{
/branches/V0.88e_ACC-HH_HR_MartinR/uart.c
144,8 → 144,8
"Current [0.1A] ",
"Capacity [mAh] ",
"Hight Setpoint ",
"FC_StatusFlags ", //25 ///MartinR
"FC_StatusFlags2 ",///MartinR
"Motor 7 ", //25 ///
"Motor 8 ",///
"Compass Setpoint",
"I2C-Error ",
"BL Limit ",
183,8 → 183,8
"Current[0.1A]",
"Capacity[mAh]",
"Hight Setp ",
"FC_Flags ", //25 ///MartinR
"FC_Flags2 ",///MartinR
"Motor 8 ", //25 ///
"Motor 9 ",///
"Compass Setp ",
"I2C-Error ",
"BL Limit ",