RTL: expose RTL state

This commit is contained in:
Thomas Stastny
2022-07-22 14:59:20 +02:00
committed by Silvan Fuhrer
parent 85a621303d
commit e512d77b89
3 changed files with 18 additions and 24 deletions
-6
View File
@@ -241,8 +241,6 @@ void RTL::find_RTL_destination()
void RTL::on_activation()
{
setLoiterDone(false);
// if a mission landing is desired we should only execute mission navigation mode if we currently are in fw mode
// In multirotor mode no landing pattern is required so we can just navigate to the land point directly and don't need to run mission
_should_engange_mission_for_landing = (_destination.type == RTL_DESTINATION_MISSION_LANDING)
@@ -291,8 +289,6 @@ void RTL::on_activation()
_rtl_state = RTL_STATE_RETURN;
}
setLoiterDone(_rtl_state > RTL_STATE_LOITER);
// reset cruising speed and throttle to default for RTL
_navigator->set_cruising_speed();
_navigator->set_cruising_throttle();
@@ -641,8 +637,6 @@ void RTL::advance_rtl()
case RTL_STATE_LOITER:
setLoiterDone(true);
if (vtol_in_fw_mode) {
_rtl_state = RTL_STATE_TRANSITION_TO_MC;