mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
Plane: fixed a bug in LOITER_TURNS in quadplanes
if NAV_LOITER_TURNS is used with Q_GUIDED_MODE=1 then we would orbit forever. This ensures we do exit the loiter
This commit is contained in:
parent
fa2a9d5f30
commit
bf544136c1
@ -2971,6 +2971,11 @@ bool QuadPlane::guided_mode_enabled(void)
|
||||
if (plane.control_mode != &plane.mode_guided && plane.control_mode != &plane.mode_auto) {
|
||||
return false;
|
||||
}
|
||||
if (plane.control_mode == &plane.mode_auto &&
|
||||
plane.mission.get_current_nav_cmd().id == MAV_CMD_NAV_LOITER_TURNS) {
|
||||
// loiter turns is a fixed wing only operation
|
||||
return false;
|
||||
}
|
||||
return guided_mode != 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user