Skip to content

Commit

Permalink
FW Position Control: fix setting of _control_mode_current to AUTO in …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
sfuhrer authored and dagar committed Dec 16, 2023
1 parent 4b25fad commit f38fe24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/fw_pos_control/FixedwingPositionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f38fe24

Please sign in to comment.