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,7 +294,6 @@ void Plane::control_failsafe()
|
|||
if (failsafe.throttle_counter > 10) {
|
||||
failsafe.throttle_counter = 10;
|
||||
}
|
||||
|
||||
} else if(failsafe.throttle_counter > 0) {
|
||||
// we are no longer in failsafe condition
|
||||
// but we need to recover quickly
|
||||
|
@ -310,7 +309,6 @@ void Plane::control_failsafe()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Plane::trim_radio()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue