Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 953e5e5 commit 1c776f1Copy full SHA for 1c776f1
src/modules/mc_att_control/mc_att_control_main.cpp
@@ -521,6 +521,12 @@ MulticopterAttitudeControl::control_attitude()
521
{
522
vehicle_attitude_setpoint_poll();
523
524
+ // reinitialize the setpoint while not armed to make sure no value from the last flight is still kept
525
+ if (!_v_control_mode.flag_armed) {
526
+ Quatf().copyTo(_v_att_sp.q_d);
527
+ Vector3f().copyTo(_v_att_sp.thrust_body);
528
+ }
529
+
530
// physical thrust axis is the negative of body z axis
531
_thrust_sp = -_v_att_sp.thrust_body[2];
532
0 commit comments