Skip to content
Snippets Groups Projects
Commit 9a2b0ac3 authored by Nicolò Caruso's avatar Nicolò Caruso Committed by Emilio Corigliano
Browse files

[ARP, Fix] Fixed led3on, Moved target angle log to SMA

<pagations
Leds: fixed led3On not calling the function, just referencing the function.
parent 55ac6b72
No related branches found
No related tags found
1 merge request!48[GS, ARP] New entrypoint for lyra_gs and ARP related things
...@@ -123,7 +123,7 @@ void Leds::ledOn(LedColor color) ...@@ -123,7 +123,7 @@ void Leds::ledOn(LedColor color)
switch (color) switch (color)
{ {
case LedColor::RED: case LedColor::RED:
miosix::led3On; miosix::led3On();
miosix::commBox::ledTimR2::high(); miosix::commBox::ledTimR2::high();
break; break;
case LedColor::YELLOW: case LedColor::YELLOW:
......
...@@ -239,6 +239,12 @@ void SMA::update() ...@@ -239,6 +239,12 @@ void SMA::update()
follower.update(); // step the follower follower.update(); // step the follower
FollowerState follow = follower.getState(); FollowerState follow = follower.getState();
// Log the target angles and propagations info
AntennaAngles target{follow.timestamp, follow.yaw, follow.pitch,
predicted.nPropagations};
Boardcore::Logger::getInstance().log(
static_cast<Boardcore::AntennaAngles>(target));
// actuate the steppers // actuate the steppers
auto steppers = ModuleManager::getInstance().get<Actuators>(); auto steppers = ModuleManager::getInstance().get<Actuators>();
steppers->setSpeed(StepperList::STEPPER_X, follow.horizontalSpeed); steppers->setSpeed(StepperList::STEPPER_X, follow.horizontalSpeed);
...@@ -301,6 +307,12 @@ void SMA::update() ...@@ -301,6 +307,12 @@ void SMA::update()
follower.update(); // step the follower follower.update(); // step the follower
FollowerState follow = follower.getState(); FollowerState follow = follower.getState();
// Log the target angles and propagations info
AntennaAngles target{follow.timestamp, follow.yaw, follow.pitch,
predicted.nPropagations};
Boardcore::Logger::getInstance().log(
static_cast<Boardcore::AntennaAngles>(target));
// actuate the steppers // actuate the steppers
steppers->setSpeed(StepperList::STEPPER_X, follow.horizontalSpeed); steppers->setSpeed(StepperList::STEPPER_X, follow.horizontalSpeed);
steppers->setSpeed(StepperList::STEPPER_Y, follow.verticalSpeed); steppers->setSpeed(StepperList::STEPPER_Y, follow.verticalSpeed);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment