Skip to content

Commit

Permalink
Navigator: remove vtol_takeoff special handling for RTL (PX4#22844)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sfuhrer authored and jwwaite committed Mar 10, 2024
1 parent f2fb5fd commit 69fd373
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/modules/navigator/navigator_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 69fd373

Please sign in to comment.