From fa8a2c766625613c0fbb98bb95aa248f054bfb21 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 26 Jan 2023 16:45:28 +0100 Subject: [PATCH] add new syrlinks events --- CHANGELOG.md | 8 ++++++-- generators/bsp_q7s_events.csv | 2 ++ generators/events/translateEvents.cpp | 10 ++++++++-- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 10 ++++++++-- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- mission/devices/SyrlinksHandler.cpp | 11 +++++++++++ .../devices/devicedefinitions/SyrlinksDefinitions.h | 4 ++++ tmtc | 2 +- 9 files changed, 42 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0fb308d..0e7ddbf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,11 +28,15 @@ list yields a list of all related PRs for each release. ## Added +Syrlinks PR: PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353 + - The Syrlinks handler has submodes for the TX mode now: RX Only (1), RX and TX default - datarate (2), RX and TX Low Rate (3), RX and TX High Rate (4) and TX Carrier Wave (3). + datarate (2), RX and TX Low Rate (3), RX and TX High Rate (4) and TX Carrier Wave (5). The submodes apply for both ON and NORMAL mode. The default datarate can be updated using a parameter command (domain ID 0 and unique ID 0) with value 0 for low rate and 1 for high rate. - PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353 +- The Syrlinks handler always sets TX to standby when switching off +- The Syrlinks handler triggers a new TX_ON event when the transmitter was switched on successfully + and a TX_OFF event when it was switched off successfully. - Startracker temperature set and PCDU switcher set are diagnostic now # [v1.20.0] 2023-01-24 diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 02df4dd2..3fd4e872 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -227,6 +227,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 13631;0x353f;HDLC_FRAME_REMOVAL_ERROR;INFO;;linux/devices/ploc/PlocSupvUartMan.h 13632;0x3540;HDLC_CRC_ERROR;INFO;;linux/devices/ploc/PlocSupvUartMan.h 13700;0x3584;FDIR_REACTION_IGNORED;MEDIUM;;mission/devices/devicedefinitions/SyrlinksDefinitions.h +13701;0x3585;TX_ON;INFO;Transmitter is on now. P1: Submode, P2: Current default datarate.;mission/devices/devicedefinitions/SyrlinksDefinitions.h +13702;0x3586;TX_OFF;INFO;Transmitter is off now.;mission/devices/devicedefinitions/SyrlinksDefinitions.h 13800;0x35e8;MISSING_PACKET;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h 13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h 13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;;mission/devices/devicedefinitions/ScexDefinitions.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index a34d77d1..06723a5d 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 241 translations. + * @brief Auto-generated event translation file. Contains 243 translations. * @details - * Generated on: 2023-01-26 16:21:02 + * Generated on: 2023-01-26 16:43:50 */ #include "translateEvents.h" @@ -228,6 +228,8 @@ const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH"; const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS"; const char *HDLC_FRAME_REMOVAL_ERROR_STRING = "HDLC_FRAME_REMOVAL_ERROR"; const char *HDLC_CRC_ERROR_STRING = "HDLC_CRC_ERROR"; +const char *TX_ON_STRING = "TX_ON"; +const char *TX_OFF_STRING = "TX_OFF"; const char *MISSING_PACKET_STRING = "MISSING_PACKET"; const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT"; const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE"; @@ -690,6 +692,10 @@ const char *translateEvents(Event event) { return HDLC_FRAME_REMOVAL_ERROR_STRING; case (13632): return HDLC_CRC_ERROR_STRING; + case (13701): + return TX_ON_STRING; + case (13702): + return TX_OFF_STRING; case (13800): return MISSING_PACKET_STRING; case (13801): diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index dbde08d8..5efc50b1 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 151 translations. - * Generated on: 2023-01-26 16:21:02 + * Generated on: 2023-01-26 16:43:50 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index a34d77d1..06723a5d 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 241 translations. + * @brief Auto-generated event translation file. Contains 243 translations. * @details - * Generated on: 2023-01-26 16:21:02 + * Generated on: 2023-01-26 16:43:50 */ #include "translateEvents.h" @@ -228,6 +228,8 @@ const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH"; const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS"; const char *HDLC_FRAME_REMOVAL_ERROR_STRING = "HDLC_FRAME_REMOVAL_ERROR"; const char *HDLC_CRC_ERROR_STRING = "HDLC_CRC_ERROR"; +const char *TX_ON_STRING = "TX_ON"; +const char *TX_OFF_STRING = "TX_OFF"; const char *MISSING_PACKET_STRING = "MISSING_PACKET"; const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT"; const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE"; @@ -690,6 +692,10 @@ const char *translateEvents(Event event) { return HDLC_FRAME_REMOVAL_ERROR_STRING; case (13632): return HDLC_CRC_ERROR_STRING; + case (13701): + return TX_ON_STRING; + case (13702): + return TX_OFF_STRING; case (13800): return MISSING_PACKET_STRING; case (13801): diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index dbde08d8..5efc50b1 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 151 translations. - * Generated on: 2023-01-26 16:21:02 + * Generated on: 2023-01-26 16:43:50 */ #include "translateObjects.h" diff --git a/mission/devices/SyrlinksHandler.cpp b/mission/devices/SyrlinksHandler.cpp index ef59dbc4..4df50cbd 100644 --- a/mission/devices/SyrlinksHandler.cpp +++ b/mission/devices/SyrlinksHandler.cpp @@ -678,6 +678,17 @@ ReturnValue_t SyrlinksHandler::handleAckReply(const uint8_t* packet) { break; } } + switch (rememberCommandId) { + case (syrlinks::SET_TX_MODE_STANDBY): { + triggerEvent(syrlinks::TX_OFF, 0, 0); + break; + } + case (syrlinks::SET_TX_MODE_MODULATION): + case (syrlinks::SET_TX_MODE_CW): { + triggerEvent(syrlinks::TX_ON, getSubmode(), datarateCfgRaw); + break; + } + } return result; } diff --git a/mission/devices/devicedefinitions/SyrlinksDefinitions.h b/mission/devices/devicedefinitions/SyrlinksDefinitions.h index 63c2b4df..bb36b793 100644 --- a/mission/devices/devicedefinitions/SyrlinksDefinitions.h +++ b/mission/devices/devicedefinitions/SyrlinksDefinitions.h @@ -20,6 +20,10 @@ enum Submode { static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SYRLINKS; static constexpr Event FDIR_REACTION_IGNORED = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); +//! [EXPORT] : [COMMENT] Transmitter is on now. P1: Submode, P2: Current default datarate. +static constexpr Event TX_ON = event::makeEvent(SUBSYSTEM_ID, 1, severity::INFO); +//! [EXPORT] : [COMMENT] Transmitter is off now. +static constexpr Event TX_OFF = event::makeEvent(SUBSYSTEM_ID, 2, severity::INFO); static const DeviceCommandId_t NONE = 0; static const DeviceCommandId_t RESET_UNIT = 1; diff --git a/tmtc b/tmtc index b8a8f4b5..39dfac25 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit b8a8f4b5a35b1ea0280c80eb49da46c9fdfb4fb5 +Subproject commit 39dfac2520ec247387c8cb912ef684868c6748c6