Rev 2538 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2538 | Rev 2541 | ||
---|---|---|---|
Line 185... | Line 185... | ||
185 | signed int CosAttitude; // for projection of hoover gas |
185 | signed int CosAttitude; // for projection of hoover gas |
186 | unsigned char ACC_AltitudeControl = 0; |
186 | unsigned char ACC_AltitudeControl = 0; |
187 | unsigned char LowVoltageLandingActive = 0; |
187 | unsigned char LowVoltageLandingActive = 0; |
188 | unsigned char LowVoltageHomeActive = 0; |
188 | unsigned char LowVoltageHomeActive = 0; |
189 | signed int DriftNick = 0, DriftRoll = 0; |
189 | signed int DriftNick = 0, DriftRoll = 0; |
- | 190 | unsigned char ServoFailsafeActive = 0; // moves Servos into the FS-Position |
|
Line 190... | Line 191... | ||
190 | 191 | ||
191 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
192 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
192 | #define OPA_OFFSET_STEP 5 |
193 | #define OPA_OFFSET_STEP 5 |
193 | #else |
194 | #else |
Line 876... | Line 877... | ||
876 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
877 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
877 | // Empfang schlecht |
878 | // Empfang schlecht |
878 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
879 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
879 | if(SenderOkay < 100 && !(FC_StatusFlags2 & FC_STATUS2_RC_FAILSAVE_ACTIVE)) |
880 | if(SenderOkay < 100 && !(FC_StatusFlags2 & FC_STATUS2_RC_FAILSAVE_ACTIVE)) |
880 | { |
881 | { |
- | 882 | ServoFailsafeActive = SERVO_FS_TIME; |
|
881 | if(RcLostTimer) RcLostTimer--; |
883 | if(RcLostTimer) RcLostTimer--; |
882 | else |
884 | else |
883 | { |
885 | { |
884 | MotorenEin = 0; |
886 | MotorenEin = 0; |
885 | modell_fliegt = 0; |
887 | modell_fliegt = 0; |
Line 1582... | Line 1584... | ||
1582 | if(UBat < u_filter) u_filter--; |
1584 | if(UBat < u_filter) u_filter--; |
1583 | slower = 100; // 5Hz |
1585 | slower = 100; // 5Hz |
1584 | if(u_filter < BattAutoLandingVoltage) |
1586 | if(u_filter < BattAutoLandingVoltage) |
1585 | { |
1587 | { |
1586 | LowVoltageLandingActive = 10; // 2 sek |
1588 | LowVoltageLandingActive = 10; // 2 sek |
- | 1589 | ServoFailsafeActive = SERVO_FS_TIME; |
|
1587 | } |
1590 | } |
1588 | else if(u_filter > BattAutoLandingVoltage + LipoCells && LowVoltageLandingActive) LowVoltageLandingActive--; |
1591 | else if(u_filter > BattAutoLandingVoltage + LipoCells && LowVoltageLandingActive) LowVoltageLandingActive--; |
Line 1589... | Line 1592... | ||
1589 | 1592 | ||
1590 | if(u_filter < BattComingHomeVoltage) |
1593 | if(u_filter < BattComingHomeVoltage) |
Line 1594... | Line 1597... | ||
1594 | else if(u_filter > BattComingHomeVoltage + LipoCells && LowVoltageHomeActive) LowVoltageHomeActive--; |
1597 | else if(u_filter > BattComingHomeVoltage + LipoCells && LowVoltageHomeActive) LowVoltageHomeActive--; |
1595 | } |
1598 | } |
1596 | if(LowVoltageLandingActive && FromNC_AltitudeSetpoint >= 0) |
1599 | if(LowVoltageLandingActive && FromNC_AltitudeSetpoint >= 0) |
1597 | { |
1600 | { |
1598 | FromNC_AltitudeSpeed = EE_Parameter.LandingSpeed; |
1601 | FromNC_AltitudeSpeed = EE_Parameter.LandingSpeed; |
- | 1602 | if(HoehenWert > 15*100) FromNC_AltitudeSpeed *= 2; // faster above 15m |
|
1599 | FromNC_AltitudeSetpoint = -20000; |
1603 | FromNC_AltitudeSetpoint = -20000; |
1600 | } |
1604 | } |
1601 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1605 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1602 | // send SPI pending bytes |
1606 | // send SPI pending bytes |
1603 | if(BytegapSPI == 0) SPI_TransmitByte(); |
1607 | if(BytegapSPI == 0) SPI_TransmitByte(); |