mirror of https://github.com/ArduPilot/ardupilot
Plane: Remove redundant protection
This commit is contained in:
parent
851ee24c99
commit
ea64077f77
|
@ -278,10 +278,10 @@ void Plane::control_failsafe()
|
|||
}
|
||||
}
|
||||
|
||||
if(g.throttle_fs_enabled == 0)
|
||||
if(g.throttle_fs_enabled == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g.throttle_fs_enabled) {
|
||||
if (rc_failsafe_active()) {
|
||||
// we detect a failsafe from radio
|
||||
// throttle has dropped below the mark
|
||||
|
@ -294,8 +294,7 @@ void Plane::control_failsafe()
|
|||
if (failsafe.throttle_counter > 10) {
|
||||
failsafe.throttle_counter = 10;
|
||||
}
|
||||
|
||||
}else if(failsafe.throttle_counter > 0) {
|
||||
} else if(failsafe.throttle_counter > 0) {
|
||||
// we are no longer in failsafe condition
|
||||
// but we need to recover quickly
|
||||
failsafe.throttle_counter--;
|
||||
|
@ -309,7 +308,6 @@ void Plane::control_failsafe()
|
|||
AP_Notify::flags.failsafe_radio = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Plane::trim_radio()
|
||||
|
|
Loading…
Reference in New Issue