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 <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2023-12-14 11:05:18 +01:00 committed by Daniel Agar
parent 4b25fad862
commit f38fe24a98
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}