aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fw_att_control/fw_att_control_main.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-10-08 09:17:58 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-10-08 09:17:58 +0200
commita3bdf536e5f6b95d54ef6684d7092ebff2d23dc8 (patch)
tree3d02ca2a53b9035f3f8499a07ed3902def18fd15 /src/modules/fw_att_control/fw_att_control_main.cpp
parentd59cdf6fcc99e85cc1d897637b1bf9e18269f77c (diff)
downloadpx4-firmware-a3bdf536e5f6b95d54ef6684d7092ebff2d23dc8.tar.gz
px4-firmware-a3bdf536e5f6b95d54ef6684d7092ebff2d23dc8.tar.bz2
px4-firmware-a3bdf536e5f6b95d54ef6684d7092ebff2d23dc8.zip
Dynamic integral resets for straight and circle mode, announcing turn radius now
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.cpp4
1 files changed, 4 insertions, 0 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 6b98003fd..ae9aaa2da 100644
--- a/src/modules/fw_att_control/fw_att_control_main.cpp
+++ b/src/modules/fw_att_control/fw_att_control_main.cpp
@@ -593,6 +593,10 @@ FixedwingAttitudeControl::task_main()
pitch_sp = _att_sp.pitch_body;
throttle_sp = _att_sp.thrust;
+ /* reset integrals where needed */
+ if (_att_sp.roll_reset_integral)
+ _roll_ctrl.reset_integrator();
+
} else {
/*
* Scale down roll and pitch as the setpoints are radians