From b29ef7257189220243da726f015ad1ed76183f53 Mon Sep 17 00:00:00 2001 From: rein0925 Date: Mon, 8 Apr 2024 00:08:27 +0900 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=95=B0=E5=90=8D=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/schneider_model.hpp | 4 ++-- src/schneider_model.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/schneider_model.hpp b/include/schneider_model.hpp index 1174782..fb1e721 100644 --- a/include/schneider_model.hpp +++ b/include/schneider_model.hpp @@ -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 モータへの出力を計算するクラス diff --git a/src/schneider_model.cpp b/src/schneider_model.cpp index 7bb5268..6254295 100644 --- a/src/schneider_model.cpp +++ b/src/schneider_model.cpp @@ -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) }