From 83c15fca9f79348069f5f3cc965032b91b717f01 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 25 May 2022 16:35:51 +0200 Subject: [PATCH] Commander: switch back to Hold mode after autonomous landing --- src/modules/commander/Commander.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index a486291249..d5ebe203f6 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -2915,6 +2915,12 @@ Commander::run() _param_flight_uuid.commit_no_notification(); _last_disarmed_timestamp = hrt_absolute_time(); + + // Switch back to Hold mode after autonomous landing + if (_vehicle_control_mode.flag_control_auto_enabled) { + main_state_transition(_vehicle_status, commander_state_s::MAIN_STATE_AUTO_LOITER, + _vehicle_status_flags, _commander_state); + } } if (!_arm_state_machine.isArmed()) {