Skip to content
Snippets Groups Projects
Commit 14fba81e authored by Federico Mandelli's avatar Federico Mandelli
Browse files

[WingController] Added flare in flight sequence (last minute fix, to be improved)

parent 5bbb5d30
No related branches found
No related tags found
No related merge requests found
Pipeline #8483 passed
...@@ -145,12 +145,9 @@ State WingController::state_calibration(const Boardcore::Event& event) ...@@ -145,12 +145,9 @@ State WingController::state_calibration(const Boardcore::Event& event)
{ {
logStatus(WingControllerState::CALIBRATION); logStatus(WingControllerState::CALIBRATION);
modules.get<Actuators>()->startTwirl(); flare();
calibrationTimeoutEventId = EventBroker::getInstance().postDelayed( calibrationTimeoutEventId = EventBroker::getInstance().postDelayed(
DPL_WES_CAL_DONE, TOPIC_DPL, WES_CALIBRATION_TIMEOUT); DPL_SERVO_ACTUATION_DETECTED, TOPIC_DPL, 2000);
modules.get<WindEstimation>()
->startWindEstimationSchemeCalibration();
return HANDLED; return HANDLED;
} }
...@@ -163,6 +160,34 @@ State WingController::state_calibration(const Boardcore::Event& event) ...@@ -163,6 +160,34 @@ State WingController::state_calibration(const Boardcore::Event& event)
{ {
return tranSuper(&WingController::state_flying); return tranSuper(&WingController::state_flying);
} }
case DPL_SERVO_ACTUATION_DETECTED:
{
reset();
calibrationTimeoutEventId = EventBroker::getInstance().postDelayed(
DPL_WIGGLE, TOPIC_DPL, 1000);
return HANDLED;
}
case DPL_WIGGLE:
{
flare();
calibrationTimeoutEventId = EventBroker::getInstance().postDelayed(
DPL_NC_OPEN, TOPIC_DPL, 2000);
return HANDLED;
}
case DPL_NC_OPEN:
{
reset();
calibrationTimeoutEventId = EventBroker::getInstance().postDelayed(
DPL_WES_CAL_DONE, TOPIC_DPL, WES_CALIBRATION_TIMEOUT);
modules.get<WindEstimation>()
->startWindEstimationSchemeCalibration();
modules.get<Actuators>()->startTwirl();
return HANDLED;
}
case DPL_WES_CAL_DONE: case DPL_WES_CAL_DONE:
{ {
modules.get<Actuators>()->stopTwirl(); modules.get<Actuators>()->stopTwirl();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment