diff --git a/src/Parafoil/Actuators/Actuators.cpp b/src/Parafoil/Actuators/Actuators.cpp index b0cd1f8f8732878e347bed63e520f109cc74fc0d..1aa20a6e73db4fdaff41cd0fcc4ac625d29ce534 100644 --- a/src/Parafoil/Actuators/Actuators.cpp +++ b/src/Parafoil/Actuators/Actuators.cpp @@ -38,14 +38,14 @@ Actuators::Actuators() { leftServo.servo = std::make_unique<Servo>( config::LeftServo::TIMER, config::LeftServo::PWM_CH, - config::LeftServo::MIN_PULSE.count(), - config::LeftServo::MAX_PULSE.count()); + config::LeftServo::MIN_PULSE.value(), + config::LeftServo::MAX_PULSE.value()); leftServo.fullRangeAngle = config::LeftServo::ROTATION; rightServo.servo = std::make_unique<Servo>( config::RightServo::TIMER, config::RightServo::PWM_CH, - config::RightServo::MIN_PULSE.count(), - config::RightServo::MAX_PULSE.count()); + config::RightServo::MIN_PULSE.value(), + config::RightServo::MAX_PULSE.value()); rightServo.fullRangeAngle = config::RightServo::ROTATION; } diff --git a/src/Parafoil/Configs/ActuatorsConfig.h b/src/Parafoil/Configs/ActuatorsConfig.h index 915a2d757802064cdf08e1293ff7002a0b214f47..24aa234223df63e1a188c0bcd88527c3823c209d 100644 --- a/src/Parafoil/Configs/ActuatorsConfig.h +++ b/src/Parafoil/Configs/ActuatorsConfig.h @@ -24,8 +24,7 @@ #include <drivers/timer/TimerUtils.h> #include <units/Angle.h> - -#include <chrono> +#include <units/Time.h> namespace Parafoil { @@ -34,7 +33,7 @@ namespace Config namespace Actuators { -/* linter off */ using namespace std::chrono_literals; +/* linter off */ using namespace Boardcore::Units::Time; /* linter off */ using namespace Boardcore::Units::Angle; namespace LeftServo @@ -44,8 +43,8 @@ constexpr Boardcore::TimerUtils::Channel PWM_CH = Boardcore::TimerUtils::Channel::CHANNEL_1; constexpr auto ROTATION = 180_deg; -constexpr auto MIN_PULSE = 500us; -constexpr auto MAX_PULSE = 2460us; +constexpr auto MIN_PULSE = 500_us; +constexpr auto MAX_PULSE = 2460_us; } // namespace LeftServo namespace RightServo @@ -55,8 +54,8 @@ constexpr Boardcore::TimerUtils::Channel PWM_CH = Boardcore::TimerUtils::Channel::CHANNEL_2; constexpr auto ROTATION = 180_deg; -constexpr auto MIN_PULSE = 2460us; -constexpr auto MAX_PULSE = 500us; +constexpr auto MIN_PULSE = 2460_us; +constexpr auto MAX_PULSE = 500_us; } // namespace RightServo constexpr auto SERVO_TWIRL_RADIUS = 0.5f; // [%]