177,8 → 177,8 |
signed int tmp_motorwert[MAX_MOTORS]; |
char VarioCharacter = ' '; |
unsigned int HooverGasEmergencyPercent = 0; // The gas value for Emergency landing |
unsigned int GasIsZeroCnt = 0; // to detect that the gas-stick is down for a while |
|
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Debugwerte zuordnen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
692,7 → 692,9 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gaswert ermitteln |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(EE_Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE) |
if(!(FC_StatusFlags & (FC_STATUS_EMERGENCY_LANDING | FC_STATUS2_RC_FAILSAVE_ACTIVE))) |
{ |
if(EE_Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE) |
{ |
if(HoverGas && HoverGas < 150 * STICK_GAIN) |
{ |
700,7 → 702,12 |
} |
else HooverGasEmergencyPercent = 45; // default if the Hoovergas was could not calculated yet |
} else HooverGasEmergencyPercent = EE_Parameter.NotGas; |
|
} |
if(GasIsZeroCnt == 30000) // in that case we have RC-Lost, but the MK is probably landed |
{ |
StickGas = 0; // Hold Gas down in that case |
HooverGasEmergencyPercent = MIN_GAS; |
} |
GasMischanteil = StickGas; |
if(GasMischanteil < MIN_GAS + 10) GasMischanteil = MIN_GAS + 10; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
886,10 → 893,25 |
} |
else delay_ausschalten = 0; |
} |
} |
if(GasIsZeroCnt < 1000) GasIsZeroCnt++; |
} |
else // gas not at minimum |
move_safety_switch = 0; |
{ |
move_safety_switch = 0; |
GasIsZeroCnt = 0; |
} |
} |
else // Empfang zwischen 100 und 140 -> schlecht |
{ |
if(GasIsZeroCnt >= 750) // gas-stick was down for 1.5 seconds before RC-Lost |
{ |
if((GPSInfo.HomeDistance < 40 * 10) && (HoehenWert < 15 * 100)) // and we are at the starting point -> maybe landed? |
{ |
GasIsZeroCnt = 30000; |
if(modell_fliegt > 1001) modell_fliegt = 1001; |
} |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// neue Werte von der Funke |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1022,11 → 1044,14 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Bei Empfangsausfall im Flug |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DebugOut.Analog[16] = GasIsZeroCnt; |
DebugOut.Analog[17] = VarioMeter; |
|
if(FC_StatusFlags2 & FC_STATUS2_RC_FAILSAVE_ACTIVE) |
{ |
StickNick = -GPS_Nick; |
StickRoll = -GPS_Roll; |
StickGas = StickGasHover; |
StickGas = StickGasHover; |
Parameter_GlobalConfig &= ~(CFG_HEADING_HOLD | CFG_DREHRATEN_BEGRENZER); |
Parameter_GlobalConfig |= CFG_HOEHENREGELUNG | CFG_ACHSENKOPPLUNG_AKTIV | CFG_KOMPASS_AKTIV | CFG_GPS_AKTIV | CFG_HOEHEN_SCHALTER | CFG_GPS_AKTIV; |
Parameter_ExtraConfig &= ~(CFG2_HEIGHT_LIMIT | CFG_LEARNABLE_CAREFREE | CFG2_VARIO_BEEP); |
1046,7 → 1071,6 |
Looping_Nick = 0; |
} |
|
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Integrale auf ACC-Signal abgleichen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |