Navigator: remove vtol_takeoff special handling for RTL (#22844)

We had a special handling for RTL triggered in vtol_takeoff state.
The idea is to wait until the VTOL Takeoff is completed and only
then switch to RTL. On a second thought this special handling isn't
really necessary and for the sake of simplicity should be removed.
This also removes the side effect of the indicated flight mode
after RTL being set to VTOL_Takeoff again.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2024-03-08 11:40:14 +01:00 committed by GitHub
parent f799141a19
commit 7884e0a3f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 11 deletions

View File

@ -783,17 +783,7 @@ void Navigator::run()
_pos_sp_triplet_published_invalid_once = false;
}
#if CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF
// If we are in VTOL takeoff, do not switch until it is finished.
if (_navigation_mode == &_vtol_takeoff && !get_mission_result()->finished) {
navigation_mode_new = &_vtol_takeoff;
} else
#endif //CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF
{
navigation_mode_new = &_rtl;
}
navigation_mode_new = &_rtl;
break;