Skip to content

Commit

Permalink
FW pos C: fix altitude control for VTOL/FW by also publishing attitud…
Browse files Browse the repository at this point in the history
…e sp if in altitude, not only if position or velocity controlled

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
  • Loading branch information
sfuhrer authored and dagar committed Sep 10, 2019
1 parent 92b824e commit 702c6f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,8 @@ FixedwingPositionControl::Run()
if (_control_mode.flag_control_offboard_enabled ||
_control_mode.flag_control_position_enabled ||
_control_mode.flag_control_velocity_enabled ||
_control_mode.flag_control_acceleration_enabled) {
_control_mode.flag_control_acceleration_enabled ||
_control_mode.flag_control_altitude_enabled) {

/* lazily publish the setpoint only once available */
if (_attitude_sp_pub != nullptr) {
Expand Down

0 comments on commit 702c6f6

Please sign in to comment.