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 authored and Daniel Agar committed 2019-09-10 13:20:07 -04:00
1 parent 92b824e218
commit 702c6f6df4
1 file changed
+2 -1
@@ -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) {