fixed wing offboard attitude setpoint fix (#6112)

This commit is contained in:
aivian
2017-02-15 23:51:50 -05:00
committed by Daniel Agar
parent a84dc2e3d2
commit 7a77e27a79
3 changed files with 15 additions and 11 deletions
@@ -974,7 +974,7 @@ FixedwingAttitudeControl::task_main()
// in STABILIZED mode we need to generate the attitude setpoint
// from manual user inputs
if (!_vcontrol_mode.flag_control_climb_rate_enabled) {
if (!_vcontrol_mode.flag_control_climb_rate_enabled && !_vcontrol_mode.flag_control_offboard_enabled) {
_att_sp.roll_body = _manual.y * _parameters.man_roll_max + _parameters.rollsp_offset_rad;
_att_sp.roll_body = math::constrain(_att_sp.roll_body, -_parameters.man_roll_max, _parameters.man_roll_max);
_att_sp.pitch_body = -_manual.x * _parameters.man_pitch_max + _parameters.pitchsp_offset_rad;