diff --git a/src/Parafoil/StateMachines/WingController/WingController.cpp b/src/Parafoil/StateMachines/WingController/WingController.cpp index cc6f805ce79e97101fe2d110c0fbc986137412ca..fd5defb10bc1ced7ee7fe29ad78d6acf86d3944f 100644 --- a/src/Parafoil/StateMachines/WingController/WingController.cpp +++ b/src/Parafoil/StateMachines/WingController/WingController.cpp @@ -57,6 +57,7 @@ WingController::WingController() EventBroker::getInstance().subscribe(this, TOPIC_FLIGHT); EventBroker::getInstance().subscribe(this, TOPIC_DPL); EventBroker::getInstance().subscribe(this, TOPIC_WING); + EventBroker::getInstance().subscribe(this, TOPIC_ALT); loadAlgorithms(); } @@ -235,12 +236,12 @@ State WingController::FlyingControlledDescent(const Boardcore::Event& event) flareWing(); flareTimeoutEventId = EventBroker::getInstance().postDelayed( - DPL_FLARE_STOP, TOPIC_FLIGHT, + FLIGHT_LANDING_FLARE_STOP, TOPIC_FLIGHT, Millisecond{Config::Wing::LandingFlare::DURATION}.value()); return HANDLED; } - case DPL_FLARE_STOP: + case FLIGHT_LANDING_FLARE_STOP: { resetWing(); resumeAlgorithm(); diff --git a/src/common/Events.h b/src/common/Events.h index add578ea936fd5be8402a9edad9bfeaa10277888..25357195449530a8bf996e3993907ad6b7ba3ee1 100644 --- a/src/common/Events.h +++ b/src/common/Events.h @@ -96,6 +96,7 @@ enum Events : uint8_t FLIGHT_MISSION_TIMEOUT, FLIGHT_NC_DETACHED, FLIGHT_WING_DESCENT, + FLIGHT_LANDING_FLARE_STOP, FMM_ASCENDING, FMM_ALGOS_CAL_DONE, FMM_STOP_LOGGING,