mc_pos_controller: fix logic for att sp publication

This commit is contained in:
tumbili 2015-08-13 22:58:32 +02:00
parent 3fd0ddf1b0
commit 044097afbb
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}