Skip to content

Commit

Permalink
定数名を変更
Browse files Browse the repository at this point in the history
  • Loading branch information
rein0925 committed Apr 7, 2024
1 parent 9215fe9 commit b29ef72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/schneider_model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ constexpr float volumeThreshold = 0.5F;
/**
* @brief pulsewidthの小さいほうの値
*/
constexpr int pulsewidthMinorUs = 550;
constexpr int rotateMinorUs = 550;

/**
* @brief pulsewidthの大きいほうの値
*/
constexpr int pulsewidthMajorUs = 2350;
constexpr int rotateMajorUs = 2350;

/**
* @brief モータへの出力を計算するクラス
Expand Down
8 changes: 4 additions & 4 deletions src/schneider_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ void Schneider::rotate() {
// ifとelseで内容が同じだといわれたがそんなことない
// NOLINTBEGIN(bugprone-branch-clone)
if (volume_ < volumeThreshold) {
this->servo_1.pulsewidth_us(pulsewidthMinorUs);
this->servo_2.pulsewidth_us(pulsewidthMajorUs);
this->servo_1.pulsewidth_us(rotateMinorUs);
this->servo_2.pulsewidth_us(rotateMajorUs);
} else {
this->servo_2.pulsewidth_us(pulsewidthMinorUs);
this->servo_1.pulsewidth_us(pulsewidthMajorUs);
this->servo_2.pulsewidth_us(rotateMinorUs);
this->servo_1.pulsewidth_us(rotateMajorUs);
}
// NOLINTEND(bugprone-branch-clone)
}
Expand Down

0 comments on commit b29ef72

Please sign in to comment.