Skip to content

Commit

Permalink
abs()の範囲を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Chikurin1014 committed May 8, 2024
1 parent 95f86cf commit c2e96e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schneider_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ inline void Schneider::state_equation() {

void Schneider::set_q(const std::array<float, 3>& gyro) {
using std::abs;
if (abs(this->q[0] <= joyThreshold)) {
if (abs(this->q[0]) <= joyThreshold) {
this->q[0] = 0;
}
if (abs(this->q[1] <= joyThreshold)) {
if (abs(this->q[1]) <= joyThreshold) {
this->q[1] = 0;
}
this->fet_1 = this->q[0];
Expand Down

0 comments on commit c2e96e7

Please sign in to comment.