116,14 → 116,10 |
//############################################################################ |
{ |
unsigned int timer,i,timer2 = 0, timerPolling; |
|
DDRB = 0x00; |
PORTB = 0x00; |
PORTB = 0x00; |
DDRD = 0x0A; // UART & J3 J4 J5 |
PORTD = 0x5F; // PPM-Input & UART |
|
if(GetParamByte(PID_EE_REVISION) == EEPARAM_REVISION - 50) SetParamByte(PID_EE_REVISION,EEPARAM_REVISION); // remove the EEPARAM_REVISION_SUB from Version 0.90g |
|
for(timer = 0; timer < 1000; timer++); // verzögern |
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
if(PINB & 0x02) |
135,11 → 131,6 |
{ |
PlatinenVersion = 23; ACC_AltitudeControl = 1; |
} |
if(PlatinenVersion != GetParamByte(PID_HARDWARE_VERSION)) |
{ |
SetParamByte(PID_EE_REVISION,0x00); // reset the Settings if the Version changed |
SetParamByte(PID_HARDWARE_VERSION,PlatinenVersion); // Remember the Version number |
} |
#else |
if(PINB & 0x01) |
{ |
186,6 → 177,18 |
LIBFC_Init(LIB_FC_COMPATIBLE); |
GRN_ON; |
sei(); |
|
if(GetParamByte(PID_EE_REVISION) == EEPARAM_REVISION - 50) SetParamByte(PID_EE_REVISION,EEPARAM_REVISION); // remove the EEPARAM_REVISION_SUB from Version 0.90g |
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
if(PlatinenVersion != GetParamByte(PID_HARDWARE_VERSION)) |
{ |
if(GetParamByte(PID_HARDWARE_VERSION) == 21) SetParamByte(PID_EE_REVISION,0); // reset the Settings if the Version changed to V2.2 |
SetParamByte(PID_HARDWARE_VERSION,PlatinenVersion); // Remember the Version number |
wdt_enable(WDTO_15MS); // Reset-Commando |
printf("\n\r--> Hardware Version Byte Changed <--"); |
while(1); |
} |
#endif |
ParamSet_Init(); |
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
274,10 → 277,10 |
DebugOut.Status[0] = 0x01 | 0x02; |
JetiBeep = 0; |
if(EE_Parameter.ExtraConfig & CFG_NO_RCOFF_BEEPING) DisableRcOffBeeping = 1; |
while (1) |
while(1) |
{ |
if(ReceiverUpdateModeActive) while (1) PORTC &= ~(1<<7); // Beeper off |
|
EEAR = EE_DUMMY; // Set the EEPROM Address pointer to an unused space |
//GRN_ON; |
if(UpdateMotor && AdReady) // ReglerIntervall |
{ |