mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 15:53:56 -04:00
Plane: is_flying_vtol: if spool mode is shut down we are not flying
The subsequent check for get_throttle passes if you switch from QHOVER to MANUAL on the ground while armed. get_throttle returns > 0.01 - but the motors are shut down so no output occurs.
This commit is contained in:
parent
b47b97a981
commit
cbb0bfb809
@ -1053,6 +1053,10 @@ bool QuadPlane::is_flying_vtol(void) const
|
||||
if (!available()) {
|
||||
return false;
|
||||
}
|
||||
if (motors->get_spool_mode() == AP_Motors::SHUT_DOWN) {
|
||||
// assume that with no motor outputs we're not flying in VTOL mode
|
||||
return false;
|
||||
}
|
||||
if (motors->get_throttle() > 0.01f) {
|
||||
// if we are demanding more than 1% throttle then don't consider aircraft landed
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user