FW att ctrl - Fix vehicle_attitude_setpoint timestamp logging when in stabilized (#7803)

This commit is contained in:
bresch 2017-08-17 02:38:19 +02:00 committed by Daniel Agar
parent 63306ada92
commit 25bbe76530

View File

@ -989,6 +989,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 && !_vcontrol_mode.flag_control_offboard_enabled) {
_att_sp.timestamp = hrt_absolute_time();
_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;