diff --git a/src/boards/common/Events.h b/src/boards/common/Events.h index 0830dca00d6bec578a1b80ee58f595a878908f6f..35602e43aa1019b4cdc5803313f2f8ebe8c65034 100644 --- a/src/boards/common/Events.h +++ b/src/boards/common/Events.h @@ -53,8 +53,17 @@ enum Events : uint8_t DPL_NC_RESET, DPL_SERVO_ACTUATION_DETECTED, DPL_WIGGLE, + CAN_FORCE_INIT, + CAN_ARM, + CAN_ENTER_TEST_MODE, + CAN_EXIT_TEST_MODE, + CAN_CALIBRATE, + CAN_DISARM, + CAN_LIFTOFF, + CAN_APOGEE_DETECTED, FLIGHT_APOGEE_DETECTED, FLIGHT_ARMED, + FLIGHT_DROGUE_DESCENT, FLIGHT_DISARMED, FLIGHT_DPL_ALT_DETECTED, FLIGHT_ERROR_DETECTED, @@ -65,10 +74,16 @@ enum Events : uint8_t FLIGHT_MISSION_TIMEOUT, FLIGHT_NC_DETACHED, FLIGHT_WING_ALT_REACHED, + FLIGHT_WING_DESCENT, + FMM_ASCENDING, FMM_ALGOS_CAL_DONE, + FMM_STOP_LOGGING, FMM_INIT_OK, FMM_INIT_ERROR, + FMM_CALIBRATE, + FMM_ALGOS_CALIBRATE, FMM_SENSORS_CAL_DONE, + FMM_READY, FSR_STATS_TIMEOUT, NAS_CALIBRATE, NAS_READY, @@ -82,7 +97,7 @@ enum Events : uint8_t TMTC_FORCE_LANDING, TMTC_FORCE_APOGEE, TMTC_FORCE_EXPULSION, - TMTC_FORCE_MAIN, + TMTC_FORCE_DEPLOYMENT, TMTC_START_LOGGING, TMTC_STOP_LOGGING, TMTC_RESET_BOARD, @@ -109,6 +124,7 @@ enum Events : uint8_t TARS_PRESSURE_STABILIZED, TARS_FILLING_DONE, TARS_REFINING_DONE, + LAST_EVENT }; inline std::string getEventString(uint8_t event) @@ -131,8 +147,17 @@ inline std::string getEventString(uint8_t event) {DPL_NC_RESET, "DPL_NC_RESET"}, {DPL_SERVO_ACTUATION_DETECTED, "DPL_SERVO_ACTUATION_DETECTED"}, {DPL_WIGGLE, "DPL_WIGGLE"}, + {CAN_FORCE_INIT, "CAN_FORCE_INIT"}, + {CAN_ARM, "CAN_ARM"}, + {CAN_ENTER_TEST_MODE, "CAN_ENTER_TEST_MODE"}, + {CAN_EXIT_TEST_MODE, "CAN_EXIT_TEST_MODE"}, + {CAN_CALIBRATE, "CAN_CALIBRATE"}, + {CAN_DISARM, "CAN_DISARM"}, + {CAN_LIFTOFF, "CAN_LIFTOFF"}, + {CAN_APOGEE_DETECTED, "CAN_APOGEE_DETECTED"}, {FLIGHT_APOGEE_DETECTED, "FLIGHT_APOGEE_DETECTED"}, {FLIGHT_ARMED, "FLIGHT_ARMED"}, + {FLIGHT_DROGUE_DESCENT, "FLIGHT_DROGUE_DESCENT"}, {FLIGHT_DISARMED, "FLIGHT_DISARMED"}, {FLIGHT_DPL_ALT_DETECTED, "FLIGHT_DPL_ALT_DETECTED"}, {FLIGHT_ERROR_DETECTED, "FLIGHT_ERROR_DETECTED"}, @@ -143,10 +168,16 @@ inline std::string getEventString(uint8_t event) {FLIGHT_NC_DETACHED, "FLIGHT_NC_DETACHED"}, {FLIGHT_MISSION_TIMEOUT, "FLIGHT_MISSION_TIMEOUT"}, {FLIGHT_WING_ALT_REACHED, "FLIGHT_WING_ALT_REACHED"}, + {FLIGHT_WING_DESCENT, "FLIGHT_WING_DESCENT"}, + {FMM_ASCENDING, "FMM_ASCENDING"}, {FMM_ALGOS_CAL_DONE, "FMM_ALGOS_CAL_DONE"}, + {FMM_STOP_LOGGING, "FMM_STOP_LOGGING"}, {FMM_INIT_OK, "FMM_INIT_OK"}, {FMM_INIT_ERROR, "FMM_INIT_ERROR"}, + {FMM_CALIBRATE, "FMM_CALIBRATE"}, + {FMM_ALGOS_CALIBRATE, "FMM_ALGOS_CALIBRATE"}, {FMM_SENSORS_CAL_DONE, "FMM_SENSORS_CAL_DONE"}, + {FMM_READY, "FMM_READY"}, {FSR_STATS_TIMEOUT, "FSR_STATS_TIMEOUT"}, {NAS_CALIBRATE, "NAS_CALIBRATE"}, {NAS_FORCE_START, "NAS_FORCE_START"}, @@ -160,7 +191,7 @@ inline std::string getEventString(uint8_t event) {TMTC_FORCE_LANDING, "TMTC_FORCE_LANDING"}, {TMTC_FORCE_APOGEE, "TMTC_FORCE_APOGEE"}, {TMTC_FORCE_EXPULSION, "TMTC_FORCE_EXPULSION"}, - {TMTC_FORCE_MAIN, "TMTC_FORCE_MAIN"}, + {TMTC_FORCE_DEPLOYMENT, "TMTC_FORCE_DEPLOYMENT"}, {TMTC_START_LOGGING, "TMTC_START_LOGGING"}, {TMTC_STOP_LOGGING, "TMTC_STOP_LOGGING"}, {TMTC_RESET_BOARD, "TMTC_RESET_BOARD"}, @@ -187,6 +218,7 @@ inline std::string getEventString(uint8_t event) {TARS_PRESSURE_STABILIZED, "TARS_PRESSURE_STABILIZED"}, {TARS_FILLING_DONE, "TARS_FILLING_DONE"}, {TARS_REFINING_DONE, "TARS_REFINING_DONE"}, + {LAST_EVENT, "LAST_EVENT"}, }; auto it = event_string_map.find(event); diff --git a/src/boards/common/Topics.h b/src/boards/common/Topics.h index 831bfc497a35915ad417ebb38736496a44c311bc..5ae774eaca762a8349a987fb63cc9ae0394ddd38 100644 --- a/src/boards/common/Topics.h +++ b/src/boards/common/Topics.h @@ -34,6 +34,7 @@ enum Topics : uint8_t TOPIC_ABK, TOPIC_ADA, TOPIC_DPL, + TOPIC_CAN, TOPIC_FLIGHT, TOPIC_FMM, TOPIC_FSR, @@ -44,8 +45,8 @@ enum Topics : uint8_t }; const std::vector<uint8_t> TOPICS_LIST{ - TOPIC_ABK, TOPIC_ADA, TOPIC_DPL, TOPIC_FLIGHT, TOPIC_FMM, - TOPIC_FSR, TOPIC_NAS, TOPIC_TMTC, TOPIC_MOTOR, TOPIC_TARS, + TOPIC_ABK, TOPIC_ADA, TOPIC_DPL, TOPIC_CAN, TOPIC_FLIGHT, TOPIC_FMM, + TOPIC_FSR, TOPIC_NAS, TOPIC_TMTC, TOPIC_MOTOR, TOPIC_TARS, }; } // namespace Common