Skip to content

Commit

Permalink
vtol_att_control_main: only reset thrust when disarmed
Browse files Browse the repository at this point in the history
to see flaps moving according to attitude control before arming.
  • Loading branch information
MaEtUgR committed Oct 15, 2019
1 parent 0cbb693 commit 0b57b18
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/modules/vtol_att_control/vtol_att_control_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,7 @@ VtolAttitudeControl::Run()

// reinitialize the setpoint while not armed to make sure no value from the last mode or flight is still kept
if (!_v_control_mode.flag_armed) {
Quatf().copyTo(_mc_virtual_att_sp.q_d);
Vector3f().copyTo(_mc_virtual_att_sp.thrust_body);
Quatf().copyTo(_v_att_sp.q_d);
Vector3f().copyTo(_v_att_sp.thrust_body);
}

Expand All @@ -414,9 +412,7 @@ VtolAttitudeControl::Run()
if (mc_att_sp_updated) {
// reinitialize the setpoint while not armed to make sure no value from the last mode or flight is still kept
if (!_v_control_mode.flag_armed) {
Quatf().copyTo(_mc_virtual_att_sp.q_d);
Vector3f().copyTo(_mc_virtual_att_sp.thrust_body);
Quatf().copyTo(_v_att_sp.q_d);
Vector3f().copyTo(_v_att_sp.thrust_body);
}
}
Expand Down

0 comments on commit 0b57b18

Please sign in to comment.