Skip to content
Snippets Groups Projects
Commit e9b8700a authored by Davide Basso's avatar Davide Basso
Browse files

[Parafoil] Replace chrono with Boardcore units

parent 6c4f5c51
No related branches found
No related tags found
1 merge request!102[Parafoil] Add Parafoil On-Board-Software
......@@ -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;
}
......
......@@ -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; // [%]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment