forked from Archive/PX4-Autopilot
mc_pos_controller: fix logic for att sp publication
This commit is contained in:
parent
3fd0ddf1b0
commit
044097afbb
|
@ -1466,7 +1466,7 @@ MulticopterPositionControl::task_main()
|
|||
_control_mode.flag_control_velocity_enabled))) {
|
||||
if (_att_sp_pub != nullptr && (_vehicle_status.is_rotary_wing || _vehicle_status.in_transition_mode)) {
|
||||
orb_publish(ORB_ID(vehicle_attitude_setpoint), _att_sp_pub, &_att_sp);
|
||||
} else if (_att_sp_pub == nullptr && _vehicle_status.is_rotary_wing){
|
||||
} else if (_att_sp_pub == nullptr && (_vehicle_status.is_rotary_wing || _vehicle_status.in_transition_mode)) {
|
||||
_att_sp_pub = orb_advertise(ORB_ID(vehicle_attitude_setpoint), &_att_sp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue