Skip to content

Commit

Permalink
[Spinal] fix: add is_attitude_ctrl_ support for yaw term
Browse files Browse the repository at this point in the history
  • Loading branch information
Li-Jinjie committed Nov 27, 2023
1 parent 5ba7c61 commit 66cbb6f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,11 @@ void AttitudeController::update(void)
}
if (axis == Z)
{
yaw_term_[i] = extra_yaw_pi_term_[i] + d_term;
if (is_attitude_ctrl_)
yaw_term_[i] = extra_yaw_pi_term_[i] + d_term;
else
yaw_term_[i] = d_term;

control_term_msg_.motors[i].yaw_d = d_term * 1000; // d_term;
}
}
Expand Down

0 comments on commit 66cbb6f

Please sign in to comment.