From f38fe24a98e05e5ecada347c32e108a12afb03aa Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Thu, 14 Dec 2023 11:05:18 +0100 Subject: [PATCH] FW Position Control: fix setting of _control_mode_current to AUTO in VTOL landing The _control_mode_current wasn't updated otherwise, and only done so by luck because we already set the current type to SETPOINT_TYPE_POSITION. Signed-off-by: Silvan Fuhrer --- src/modules/fw_pos_control/FixedwingPositionControl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/fw_pos_control/FixedwingPositionControl.cpp b/src/modules/fw_pos_control/FixedwingPositionControl.cpp index 16575f3107..01fe6fe742 100644 --- a/src/modules/fw_pos_control/FixedwingPositionControl.cpp +++ b/src/modules/fw_pos_control/FixedwingPositionControl.cpp @@ -710,6 +710,7 @@ FixedwingPositionControl::set_control_mode_current(const hrt_abstime &now) } } else { + _control_mode_current = FW_POSCTRL_MODE_AUTO; // in this case we want the waypoint handled as a position setpoint -- a submode in control_auto() _pos_sp_triplet.current.type = position_setpoint_s::SETPOINT_TYPE_POSITION; }