fix for GPS non-return
This commit is contained in:
parent
f5a56804b1
commit
fb51f63735
|
@ -985,7 +985,7 @@ void processRxModes(timeUs_t currentTimeUs)
|
|||
}
|
||||
|
||||
#ifdef USE_GPS_RESCUE
|
||||
if (ARMING_FLAG(ARMED) && IS_RC_MODE_ACTIVE(BOXGPSRESCUE)) {
|
||||
if (ARMING_FLAG(ARMED) && (IS_RC_MODE_ACTIVE(BOXGPSRESCUE) || (failsafeIsActive() && failsafeConfig()->failsafe_procedure == FAILSAFE_PROCEDURE_GPS_RESCUE))) {
|
||||
if (!FLIGHT_MODE(GPS_RESCUE_MODE)) {
|
||||
ENABLE_FLIGHT_MODE(GPS_RESCUE_MODE);
|
||||
}
|
||||
|
|
|
@ -653,15 +653,17 @@ void detectAndApplySignalLossBehaviour(void)
|
|||
}
|
||||
|
||||
if (ARMING_FLAG(ARMED) && failsafeIsActive()) {
|
||||
// apply failsafe values, until failsafe ends, or disarmed, unless in GPS Return
|
||||
if ((channel < NON_AUX_CHANNEL_COUNT) && !FLIGHT_MODE(GPS_RESCUE_MODE)) {
|
||||
if (channel == THROTTLE ) {
|
||||
sample = failsafeConfig()->failsafe_throttle;
|
||||
} else {
|
||||
sample = rxConfig()->midrc;
|
||||
// apply failsafe values, until failsafe ends, or disarmed, unless in GPS Return (where stick values should remain)
|
||||
if (channel < NON_AUX_CHANNEL_COUNT) {
|
||||
if (!FLIGHT_MODE(GPS_RESCUE_MODE)) {
|
||||
if (channel == THROTTLE ) {
|
||||
sample = failsafeConfig()->failsafe_throttle;
|
||||
} else {
|
||||
sample = rxConfig()->midrc;
|
||||
}
|
||||
}
|
||||
} else if (!failsafeAuxSwitch) {
|
||||
// aux channels as Set in Configurator, unless failsafe initiated by switch
|
||||
// aux channels as Set in Configurator, unless failsafe initiated by switch
|
||||
sample = getRxfailValue(channel);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue