Rev 2333 | Rev 2336 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2333 | Rev 2334 | ||
---|---|---|---|
Line 121... | Line 121... | ||
121 | PORTB = 0x00; |
121 | PORTB = 0x00; |
122 | DDRD = 0x0A; // UART & J3 J4 J5 |
122 | DDRD = 0x0A; // UART & J3 J4 J5 |
123 | PORTD = 0x5F; // PPM-Input & UART |
123 | PORTD = 0x5F; // PPM-Input & UART |
124 | for(timer = 0; timer < 1000; timer++); // verzögern |
124 | for(timer = 0; timer < 1000; timer++); // verzögern |
125 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
125 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
- | 126 | unsigned char AccZ_ErrorCnt = 0; |
|
126 | if(PINB & 0x02) |
127 | if(PINB & 0x02) |
127 | { |
128 | { |
128 | if(PIND & 0x10) PlatinenVersion = 21; // No Bridge from J4 to GND |
129 | if(PIND & 0x10) PlatinenVersion = 21; // No Bridge from J4 to GND |
129 | else { PlatinenVersion = 22; ACC_AltitudeControl = 1;}; |
130 | else { PlatinenVersion = 22; ACC_AltitudeControl = 1;}; |
130 | } |
131 | } |
Line 341... | Line 342... | ||
341 | CalcNickServoValue(); |
342 | CalcNickServoValue(); |
342 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
343 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
343 | if(EE_Parameter.Receiver == RECEIVER_HOTT) HoTT_Menu(); |
344 | if(EE_Parameter.Receiver == RECEIVER_HOTT) HoTT_Menu(); |
344 | else |
345 | else |
345 | if(EE_Parameter.Receiver == RECEIVER_JETI) BuildJeti_Vario(); |
346 | if(EE_Parameter.Receiver == RECEIVER_JETI) BuildJeti_Vario(); |
- | 347 | // ++++++++++++++++++++++++++++ |
|
- | 348 | // + check the ACC-Z range |
|
- | 349 | if(ACC_AltitudeControl && ((Aktuell_az < 300) || (DebugOut.Analog[7] < (128 * 4) && Aktuell_az > 850))) // DebugOut.Analog[7] = GasMischanteil |
|
- | 350 | { |
|
- | 351 | if(++AccZ_ErrorCnt > 50) |
|
- | 352 | { |
|
- | 353 | if(MotorenEin) VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_TOP; |
|
- | 354 | else CalibrationDone = 0; |
|
- | 355 | } |
|
- | 356 | } |
|
- | 357 | else AccZ_ErrorCnt = 0; |
|
- | 358 | // ++++++++++++++++++++++++++++ |
|
346 | #endif |
359 | #endif |
347 | if(MissingMotor) |
360 | if(MissingMotor) |
348 | { |
361 | { |
349 | VersionInfo.HardwareError[1] |= FC_ERROR1_BL_MISSING; |
362 | VersionInfo.HardwareError[1] |= FC_ERROR1_BL_MISSING; |
350 | DebugOut.Status[1] |= 0x02; // BL-Error-Status |
363 | DebugOut.Status[1] |= 0x02; // BL-Error-Status |