FW pos C: fix altitude control for VTOL/FW by also publishing attitude sp if in altitude, not only if position or velocity controlled

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2019-09-06 19:08:59 +02:00
committed by Daniel Agar
parent 92b824e218
commit 702c6f6df4
@@ -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) {