Enable DO_SET_SPEED commands outside of missions in other AUTO modes (#18834)

* Navigator: enable DO_CHANGE_SPEED for outside of mission
- update _mission_cruising_speed_mc/_fw also if DO_CHANGE_SPEED command
is received outside of mission (e.g. while Loitering doing an Orbit)
- if vehicle is in AUTO_LOITER when receiving the change speed, then immediately
apply it by doing a reposition without updating any other field than cruising_speed
and cruising_throttle
-when RTL is activated reset the cruising speed and throttle

* Navigator: reset cruise speed and throttle to default when VTOL-transitioning

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2022-02-17 11:19:02 +01:00
committed by GitHub
parent b0f9611eb9
commit c13726af66
3 changed files with 30 additions and 7 deletions
+4
View File
@@ -287,6 +287,10 @@ void RTL::on_activation()
setClimbAndReturnDone(_rtl_state > RTL_STATE_RETURN);
// reset cruising speed and throttle to default for RTL
_navigator->set_cruising_speed();
_navigator->set_cruising_throttle();
set_rtl_item();
}