diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-01 14:00:54 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-01 14:00:54 +0200 |
commit | 4b9f9281f5d2b425f0de83801eb38224395c0f12 (patch) | |
tree | b0a5332543de1e6f4d46901a83c85bfebf6b4795 /src/modules/fw_att_control/fw_att_control_main.cpp | |
parent | 5c6a5411288ea181503269a711de2e626ddb5185 (diff) | |
parent | 8f957aeb5f8f7527d1ef2a5583f4de7870c60513 (diff) | |
download | px4-firmware-4b9f9281f5d2b425f0de83801eb38224395c0f12.tar.gz px4-firmware-4b9f9281f5d2b425f0de83801eb38224395c0f12.tar.bz2 px4-firmware-4b9f9281f5d2b425f0de83801eb38224395c0f12.zip |
Merged master into vision_estimate
Diffstat (limited to 'src/modules/fw_att_control/fw_att_control_main.cpp')
-rw-r--r-- | src/modules/fw_att_control/fw_att_control_main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp index 178b590ae..3cd4ce928 100644 --- a/src/modules/fw_att_control/fw_att_control_main.cpp +++ b/src/modules/fw_att_control/fw_att_control_main.cpp @@ -707,14 +707,21 @@ FixedwingAttitudeControl::task_main() float throttle_sp = 0.0f; if (_vcontrol_mode.flag_control_velocity_enabled || _vcontrol_mode.flag_control_position_enabled) { + /* read in attitude setpoint from attitude setpoint uorb topic */ roll_sp = _att_sp.roll_body + _parameters.rollsp_offset_rad; pitch_sp = _att_sp.pitch_body + _parameters.pitchsp_offset_rad; throttle_sp = _att_sp.thrust; /* reset integrals where needed */ - if (_att_sp.roll_reset_integral) + if (_att_sp.roll_reset_integral) { _roll_ctrl.reset_integrator(); - + } + if (_att_sp.pitch_reset_integral) { + _pitch_ctrl.reset_integrator(); + } + if (_att_sp.yaw_reset_integral) { + _yaw_ctrl.reset_integrator(); + } } else { /* * Scale down roll and pitch as the setpoints are radians |