fw rate control: initialize rate control resets to false in stabilized mode

before there was a corner case where if in an auto mode that sets a reset command on the attitude setpoint message (e.g. auto takeoff), if the mode was then switched stabilized, this reset bool would never be changed back to false and the integrators would reset every cycle
This commit is contained in:
Thomas Stastny authored and Silvan Fuhrer committed 2022-10-28 09:26:51 +02:00
1 parent 824e02a8b6
commit 498937c56c
1 file changed
+2
@@ -157,6 +157,8 @@ FixedwingAttitudeControl::vehicle_manual_poll(const float yaw_body)
Quatf q(Eulerf(_att_sp.roll_body, _att_sp.pitch_body, _att_sp.yaw_body));
q.copyTo(_att_sp.q_d);
_att_sp.reset_rate_integrals = false;
_att_sp.timestamp = hrt_absolute_time();
_attitude_sp_pub.publish(_att_sp);