From b7e49531269eed57ffd34d2af2917501c0800f45 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 16:00:39 +0200 Subject: [PATCH 1/8] the TCS subsystem does not work on the EM.. --- bsp_q7s/em/emObjectFactory.cpp | 2 +- bsp_q7s/fmObjectFactory.cpp | 2 +- dummies/Tmp1075Dummy.cpp | 13 ++++++++++++- dummies/Tmp1075Dummy.h | 1 + mission/controller/ThermalController.cpp | 16 ++++++++++++++++ mission/system/systemTree.cpp | 4 ++-- mission/system/systemTree.h | 2 +- mission/system/tcs/tcsModeTree.cpp | 22 +++++++++++++--------- mission/system/tcs/tcsModeTree.h | 2 +- mission/tcs/Tmp1075Handler.cpp | 7 ++++++- tmtc | 2 +- 11 files changed, 55 insertions(+), 18 deletions(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 28fabe7a..085d5184 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -168,5 +168,5 @@ void ObjectFactory::produce(void* args) { HeaterHandler* heaterHandler; createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler); createThermalController(*heaterHandler, true); - satsystem::init(); + satsystem::init(true); } diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index fa6e7220..5e2cdb59 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -133,5 +133,5 @@ void ObjectFactory::produce(void* args) { createMiscComponents(); createThermalController(*heaterHandler, false); createAcsController(true, enableHkSets); - satsystem::init(); + satsystem::init(false); } diff --git a/dummies/Tmp1075Dummy.cpp b/dummies/Tmp1075Dummy.cpp index 96d1f775..7e61acef 100644 --- a/dummies/Tmp1075Dummy.cpp +++ b/dummies/Tmp1075Dummy.cpp @@ -9,7 +9,11 @@ Tmp1075Dummy::Tmp1075Dummy(object_id_t objectId, object_id_t comif, CookieIF *co : DeviceHandlerBase(objectId, comif, comCookie), set(this) {} void Tmp1075Dummy::doStartUp() { setMode(MODE_ON); } -void Tmp1075Dummy::doShutDown() { setMode(MODE_OFF); } +void Tmp1075Dummy::doShutDown() { + PoolReadGuard pg(&set); + set.setValidity(false, true); + setMode(MODE_OFF); +} ReturnValue_t Tmp1075Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; @@ -50,4 +54,11 @@ ReturnValue_t Tmp1075Dummy::initializeLocalDataPool(localpool::DataPool &localDa return OK; } +ReturnValue_t Tmp1075Dummy::setHealth(HealthState health) { + if (health == FAULTY or health == PERMANENT_FAULTY) { + setMode(_MODE_SHUT_DOWN); + } + return DeviceHandlerBase::setHealth(health); +} + LocalPoolDataSetBase *Tmp1075Dummy::getDataSetHandle(sid_t sid) { return &set; } diff --git a/dummies/Tmp1075Dummy.h b/dummies/Tmp1075Dummy.h index 570fcd42..feab4f98 100644 --- a/dummies/Tmp1075Dummy.h +++ b/dummies/Tmp1075Dummy.h @@ -26,6 +26,7 @@ class Tmp1075Dummy : public DeviceHandlerBase { uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) override; + ReturnValue_t setHealth(HealthState health) override; protected: LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override; diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index fca71acc..cb7af849 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -1209,6 +1209,9 @@ void ThermalController::ctrlIfBoard() { sensors[2].first = deviceTemperatures.mgm2SideB.isValid(); sensors[2].second = deviceTemperatures.mgm2SideB.value; numSensors = 3; + if (not sensors[1].first) { + sif::debug << "TMP1075 IF Board not valid" << std::endl; + } HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_1_PCDU_PDU, ifBoardLimits); ctrlComponentTemperature(htrCtx); // TODO: special event overheating + could go back to safe mode @@ -1249,12 +1252,19 @@ void ThermalController::ctrlObc() { void ThermalController::ctrlObcIfBoard() { thermalComponent = OBCIF_BOARD; + sensors[0].first = deviceTemperatures.q7s.isValid(); sensors[0].second = deviceTemperatures.q7s.value; sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid(); sensors[1].second = sensorTemperatures.tmp1075Tcs0.value; sensors[2].first = sensorTemperatures.tmp1075Tcs1.isValid(); sensors[2].second = sensorTemperatures.tmp1075Tcs1.value; + if (not sensors[1].first) { + sif::debug << "TMP1075 TCS 0 not valid" << std::endl; + } + if (not sensors[2].first) { + sif::debug << "TMP1075 TCS 1 not valid" << std::endl; + } numSensors = 3; HeaterContext htrCtx(heater::HEATER_3_OBC_BRD, heater::HEATER_2_ACS_BRD, obcIfBoardLimits); ctrlComponentTemperature(htrCtx); @@ -1363,6 +1373,12 @@ void ThermalController::ctrlPlPcduBoard() { sensors[2].second = deviceTemperatures.adcPayloadPcdu.value; sensors[3].first = sensorTemperatures.plpcduHeatspreader.isValid(); sensors[3].second = sensorTemperatures.plpcduHeatspreader.value; + if (not sensors[0].first) { + sif::debug << "TMP1075 PL PCDU 0 not valid" << std::endl; + } + if (not sensors[1].first) { + sif::debug << "TMP1075 PL PCDU 1 not valid" << std::endl; + } numSensors = 4; HeaterContext htrCtx(heater::HEATER_1_PCDU_PDU, heater::HEATER_2_ACS_BRD, plPcduBoardLimits); ctrlComponentTemperature(htrCtx); diff --git a/mission/system/systemTree.cpp b/mission/system/systemTree.cpp index 41bf3216..10c40617 100644 --- a/mission/system/systemTree.cpp +++ b/mission/system/systemTree.cpp @@ -31,12 +31,12 @@ void buildPtgInertialSequence(Subsystem& ss, ModeListEntry& eh); static const auto OFF = HasModesIF::MODE_OFF; static const auto NML = DeviceHandlerIF::MODE_NORMAL; -void satsystem::init() { +void satsystem::init(bool commandPlPcdu1) { auto& acsSubsystem = acs::init(); acsSubsystem.connectModeTreeParent(EIVE_SYSTEM); auto& payloadSubsystem = payload::init(); payloadSubsystem.connectModeTreeParent(EIVE_SYSTEM); - auto& tcsSubsystem = tcs::init(); + auto& tcsSubsystem = tcs::init(commandPlPcdu1); tcsSubsystem.connectModeTreeParent(EIVE_SYSTEM); auto& comSubsystem = com::init(); comSubsystem.connectModeTreeParent(EIVE_SYSTEM); diff --git a/mission/system/systemTree.h b/mission/system/systemTree.h index 9d769277..0ed73a89 100644 --- a/mission/system/systemTree.h +++ b/mission/system/systemTree.h @@ -5,7 +5,7 @@ namespace satsystem { -void init(); +void init(bool commandPlPcdu1); extern EiveSystem EIVE_SYSTEM; diff --git a/mission/system/tcs/tcsModeTree.cpp b/mission/system/tcs/tcsModeTree.cpp index 6cc57c6f..4186f9dd 100644 --- a/mission/system/tcs/tcsModeTree.cpp +++ b/mission/system/tcs/tcsModeTree.cpp @@ -10,8 +10,8 @@ TcsSubsystem satsystem::tcs::SUBSYSTEM(objects::TCS_SUBSYSTEM, 12, 24); namespace { // Alias for checker function const auto check = subsystem::checkInsert; -void buildOffSequence(Subsystem& ss, ModeListEntry& eh); -void buildNormalSequence(Subsystem& ss, ModeListEntry& eh); +void buildOffSequence(Subsystem& ss, ModeListEntry& eh, bool commandPlPcdu1); +void buildNormalSequence(Subsystem& ss, ModeListEntry& eh, bool commandPlPcdu1); } // namespace static const auto OFF = HasModesIF::MODE_OFF; @@ -27,17 +27,17 @@ auto TCS_TABLE_NORMAL_TGT = std::make_pair((NML << 24) | 1, FixedArrayList()); auto TCS_TABLE_NORMAL_TRANS_1 = std::make_pair((NML << 24) | 3, FixedArrayList()); -Subsystem& satsystem::tcs::init() { +Subsystem& satsystem::tcs::init(bool commandPlPcdu1) { ModeListEntry entry; - buildOffSequence(SUBSYSTEM, entry); - buildNormalSequence(SUBSYSTEM, entry); + buildOffSequence(SUBSYSTEM, entry, commandPlPcdu1); + buildNormalSequence(SUBSYSTEM, entry, commandPlPcdu1); SUBSYSTEM.setInitialMode(OFF); return SUBSYSTEM; } namespace { -void buildOffSequence(Subsystem& ss, ModeListEntry& eh) { +void buildOffSequence(Subsystem& ss, ModeListEntry& eh, bool commandPlPcdu1) { std::string context = "satsystem::tcs::buildOffSequence"; auto ctxc = context.c_str(); // Insert Helper Table @@ -67,7 +67,9 @@ void buildOffSequence(Subsystem& ss, ModeListEntry& eh) { iht(objects::TMP1075_HANDLER_TCS_0, OFF, 0, TCS_TABLE_OFF_TRANS_1.second); iht(objects::TMP1075_HANDLER_TCS_1, OFF, 0, TCS_TABLE_OFF_TRANS_1.second); iht(objects::TMP1075_HANDLER_PLPCDU_0, OFF, 0, TCS_TABLE_OFF_TRANS_1.second); - // TMP PL PCDU 1 is damaged + if (commandPlPcdu1) { + iht(objects::TMP1075_HANDLER_PLPCDU_1, OFF, 0, TCS_TABLE_OFF_TRANS_1.second); + } iht(objects::TMP1075_HANDLER_IF_BOARD, OFF, 0, TCS_TABLE_OFF_TRANS_1.second); check(ss.addTable(TableEntry(TCS_TABLE_OFF_TRANS_1.first, &TCS_TABLE_OFF_TRANS_1.second)), ctxc); @@ -79,7 +81,7 @@ void buildOffSequence(Subsystem& ss, ModeListEntry& eh) { ctxc); } -void buildNormalSequence(Subsystem& ss, ModeListEntry& eh) { +void buildNormalSequence(Subsystem& ss, ModeListEntry& eh, bool commandPlPcdu1) { std::string context = "satsystem::tcs::buildNormalSequence"; auto ctxc = context.c_str(); // Insert Helper Table @@ -105,7 +107,9 @@ void buildNormalSequence(Subsystem& ss, ModeListEntry& eh) { iht(objects::TMP1075_HANDLER_TCS_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_TCS_1, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_PLPCDU_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); - // TMP PL PCDU 1 is damaged + if (commandPlPcdu1) { + iht(objects::TMP1075_HANDLER_PLPCDU_1, NML, 0, TCS_TABLE_OFF_TRANS_0.second); + } iht(objects::TMP1075_HANDLER_IF_BOARD, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TRANS_0.first, &TCS_TABLE_NORMAL_TRANS_0.second)), ctxc); diff --git a/mission/system/tcs/tcsModeTree.h b/mission/system/tcs/tcsModeTree.h index e5973641..4370ae73 100644 --- a/mission/system/tcs/tcsModeTree.h +++ b/mission/system/tcs/tcsModeTree.h @@ -7,7 +7,7 @@ namespace satsystem { namespace tcs { extern TcsSubsystem SUBSYSTEM; -Subsystem& init(); +Subsystem& init(bool commandPlPcdu1); } // namespace tcs } // namespace satsystem diff --git a/mission/tcs/Tmp1075Handler.cpp b/mission/tcs/Tmp1075Handler.cpp index 575a5fdf..7a7a48fe 100644 --- a/mission/tcs/Tmp1075Handler.cpp +++ b/mission/tcs/Tmp1075Handler.cpp @@ -15,6 +15,7 @@ Tmp1075Handler::~Tmp1075Handler() {} void Tmp1075Handler::doStartUp() { setMode(MODE_ON); } void Tmp1075Handler::doShutDown() { + sif::debug << "TMP1075: Going off" << std::endl; communicationStep = CommunicationStep::START_ADC_CONVERSION; PoolReadGuard pg(&dataset); dataset.setValidity(false, true); @@ -140,5 +141,9 @@ ReturnValue_t Tmp1075Handler::setHealth(HealthState health) { health != EXTERNAL_CONTROL) { return returnvalue::FAILED; } - return returnvalue::OK; + // Required because we do not have an assembly. + if (health == FAULTY) { + setMode(_MODE_SHUT_DOWN); + } + return DeviceHandlerBase::setHealth(health); } diff --git a/tmtc b/tmtc index c48f04ee..6d5bde40 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit c48f04eed5152f319b217870292968fb67b763d4 +Subproject commit 6d5bde40db69534a8cea923f96145bdeb62b79af From 61822188138e2149c48405627d3c4ebb4adaabad Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 17:23:55 +0200 Subject: [PATCH 2/8] this works but is kind of ugly --- bsp_q7s/objectFactory.cpp | 4 ---- dummies/Max31865Dummy.cpp | 12 +++++++++--- mission/controller/ThermalController.cpp | 15 --------------- mission/system/tcs/tcsModeTree.cpp | 2 +- mission/tcs/Tmp1075Handler.cpp | 4 +--- mission/tcs/Tmp1075Handler.h | 2 -- 6 files changed, 11 insertions(+), 28 deletions(-) diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index cd4dd32c..a96051f2 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -172,10 +172,6 @@ void ObjectFactory::createTmpComponents(std::vectorsetCustomFdir(new TmpDevFdir(tmpDevsToAdd[idx].first)); tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM); - // TODO: Remove this after TCS subsystem was added - // These devices are connected to the 3V3 stack and should be powered permanently. Therefore, - // we set them to normal mode immediately here. - tmpDevHandler->setModeNormal(); } } diff --git a/dummies/Max31865Dummy.cpp b/dummies/Max31865Dummy.cpp index 6ec1a716..99fc336a 100644 --- a/dummies/Max31865Dummy.cpp +++ b/dummies/Max31865Dummy.cpp @@ -7,15 +7,21 @@ using namespace returnvalue; Max31865Dummy::Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) : DeviceHandlerBase(objectId, comif, comCookie), set(this, EiveMax31855::EXCHANGE_SET_ID) {} void Max31865Dummy::doStartUp() { setMode(MODE_ON); } -void Max31865Dummy::doShutDown() { setMode(_MODE_POWER_DOWN); } +void Max31865Dummy::doShutDown() { + PoolReadGuard pg(&set); + set.setValidity(false, true); + setMode(MODE_OFF); +} ReturnValue_t Max31865Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } -ReturnValue_t Max31865Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return OK; } +ReturnValue_t Max31865Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} ReturnValue_t Max31865Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData, size_t commandDataLen) { - return 0; + return NOTHING_TO_SEND; } ReturnValue_t Max31865Dummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, size_t *foundLen) { diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index cb7af849..dcd20a0c 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -1209,9 +1209,6 @@ void ThermalController::ctrlIfBoard() { sensors[2].first = deviceTemperatures.mgm2SideB.isValid(); sensors[2].second = deviceTemperatures.mgm2SideB.value; numSensors = 3; - if (not sensors[1].first) { - sif::debug << "TMP1075 IF Board not valid" << std::endl; - } HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_1_PCDU_PDU, ifBoardLimits); ctrlComponentTemperature(htrCtx); // TODO: special event overheating + could go back to safe mode @@ -1259,12 +1256,6 @@ void ThermalController::ctrlObcIfBoard() { sensors[1].second = sensorTemperatures.tmp1075Tcs0.value; sensors[2].first = sensorTemperatures.tmp1075Tcs1.isValid(); sensors[2].second = sensorTemperatures.tmp1075Tcs1.value; - if (not sensors[1].first) { - sif::debug << "TMP1075 TCS 0 not valid" << std::endl; - } - if (not sensors[2].first) { - sif::debug << "TMP1075 TCS 1 not valid" << std::endl; - } numSensors = 3; HeaterContext htrCtx(heater::HEATER_3_OBC_BRD, heater::HEATER_2_ACS_BRD, obcIfBoardLimits); ctrlComponentTemperature(htrCtx); @@ -1373,12 +1364,6 @@ void ThermalController::ctrlPlPcduBoard() { sensors[2].second = deviceTemperatures.adcPayloadPcdu.value; sensors[3].first = sensorTemperatures.plpcduHeatspreader.isValid(); sensors[3].second = sensorTemperatures.plpcduHeatspreader.value; - if (not sensors[0].first) { - sif::debug << "TMP1075 PL PCDU 0 not valid" << std::endl; - } - if (not sensors[1].first) { - sif::debug << "TMP1075 PL PCDU 1 not valid" << std::endl; - } numSensors = 4; HeaterContext htrCtx(heater::HEATER_1_PCDU_PDU, heater::HEATER_2_ACS_BRD, plPcduBoardLimits); ctrlComponentTemperature(htrCtx); diff --git a/mission/system/tcs/tcsModeTree.cpp b/mission/system/tcs/tcsModeTree.cpp index 4186f9dd..09a4fa61 100644 --- a/mission/system/tcs/tcsModeTree.cpp +++ b/mission/system/tcs/tcsModeTree.cpp @@ -108,7 +108,7 @@ void buildNormalSequence(Subsystem& ss, ModeListEntry& eh, bool commandPlPcdu1) iht(objects::TMP1075_HANDLER_TCS_1, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_PLPCDU_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); if (commandPlPcdu1) { - iht(objects::TMP1075_HANDLER_PLPCDU_1, NML, 0, TCS_TABLE_OFF_TRANS_0.second); + iht(objects::TMP1075_HANDLER_PLPCDU_1, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); } iht(objects::TMP1075_HANDLER_IF_BOARD, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TRANS_0.first, &TCS_TABLE_NORMAL_TRANS_0.second)), diff --git a/mission/tcs/Tmp1075Handler.cpp b/mission/tcs/Tmp1075Handler.cpp index 7a7a48fe..a2daa819 100644 --- a/mission/tcs/Tmp1075Handler.cpp +++ b/mission/tcs/Tmp1075Handler.cpp @@ -134,15 +134,13 @@ ReturnValue_t Tmp1075Handler::initializeLocalDataPool(localpool::DataPool &local return returnvalue::OK; } -void Tmp1075Handler::setModeNormal() { setMode(_MODE_TO_NORMAL); } - ReturnValue_t Tmp1075Handler::setHealth(HealthState health) { if (health != FAULTY and health != PERMANENT_FAULTY and health != HEALTHY and health != EXTERNAL_CONTROL) { return returnvalue::FAILED; } // Required because we do not have an assembly. - if (health == FAULTY) { + if (health == FAULTY or health == PERMANENT_FAULTY) { setMode(_MODE_SHUT_DOWN); } return DeviceHandlerBase::setHealth(health); diff --git a/mission/tcs/Tmp1075Handler.h b/mission/tcs/Tmp1075Handler.h index 02fd6823..4badca39 100644 --- a/mission/tcs/Tmp1075Handler.h +++ b/mission/tcs/Tmp1075Handler.h @@ -20,8 +20,6 @@ class Tmp1075Handler : public DeviceHandlerBase { Tmp1075Handler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie); virtual ~Tmp1075Handler(); - void setModeNormal(); - protected: void doStartUp() override; void doShutDown() override; From 61ea80f92c1fb78ff57439c19e7c45de9c23120d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 17:26:09 +0200 Subject: [PATCH 3/8] remove some cruft --- mission/controller/ThermalController.cpp | 1 - mission/tcs/Tmp1075Handler.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index dcd20a0c..fca71acc 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -1249,7 +1249,6 @@ void ThermalController::ctrlObc() { void ThermalController::ctrlObcIfBoard() { thermalComponent = OBCIF_BOARD; - sensors[0].first = deviceTemperatures.q7s.isValid(); sensors[0].second = deviceTemperatures.q7s.value; sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid(); diff --git a/mission/tcs/Tmp1075Handler.cpp b/mission/tcs/Tmp1075Handler.cpp index a2daa819..7e8569b6 100644 --- a/mission/tcs/Tmp1075Handler.cpp +++ b/mission/tcs/Tmp1075Handler.cpp @@ -15,7 +15,6 @@ Tmp1075Handler::~Tmp1075Handler() {} void Tmp1075Handler::doStartUp() { setMode(MODE_ON); } void Tmp1075Handler::doShutDown() { - sif::debug << "TMP1075: Going off" << std::endl; communicationStep = CommunicationStep::START_ADC_CONVERSION; PoolReadGuard pg(&dataset); dataset.setValidity(false, true); From 5630ae4962db3ada1a81b7987a13815d8ce4c0b7 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 17:28:12 +0200 Subject: [PATCH 4/8] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f904a9..40622385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,9 @@ will consitute of a breaking change warranting a new major release: - TMP1075: Set dataset invalid on shutdown explicitely - Small fixes for TMP1075 FDIR: Use strange and missed reply counters. +- TMP1075: Devices did not go to OFF mode when being set faulty. +- Update PL PCDU 1 in TCS mode tree on the EM. +- TMP1075: Possibly ignored health commands. # [v6.0.0] 2023-07-02 From 3c9eec7b3fb85cde00b210d2a64c81550348aac4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 18:58:57 +0200 Subject: [PATCH 5/8] heater events for TCS ctrl --- mission/controller/ThermalController.cpp | 97 +++++++++++++----------- mission/controller/ThermalController.h | 2 +- mission/controller/tcsDefs.h | 4 + tmtc | 2 +- 4 files changed, 57 insertions(+), 48 deletions(-) diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index fca71acc..229742cf 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -1008,7 +1008,7 @@ void ThermalController::ctrlAcsBoard() { heater::Switch redSwitchNr = heater::HEATER_3_OBC_BRD; // A side - thermalComponent = ACS_BOARD; + currThermalComponent = ACS_BOARD; sensors[0].first = deviceTemperatures.gyro0SideA.isValid(); sensors[0].second = deviceTemperatures.gyro0SideA.value; sensors[1].first = deviceTemperatures.gyro2SideB.isValid(); @@ -1052,7 +1052,7 @@ void ThermalController::ctrlAcsBoard() { if (chooseHeater(switchNr, redSwitchNr)) { if (heaterHandler.getSwitchState(switchNr)) { if (submode != SUBMODE_NO_HEATER_CTRL) { - heaterSwitchHelper(switchNr, HeaterHandler::SwitchState::OFF, thermalComponent); + heaterSwitchHelper(switchNr, HeaterHandler::SwitchState::OFF, currThermalComponent); } } } @@ -1062,7 +1062,7 @@ void ThermalController::ctrlAcsBoard() { } void ThermalController::ctrlMgt() { - thermalComponent = MGT; + currThermalComponent = MGT; sensors[0].first = sensorTemperatures.mgt.isValid(); sensors[0].second = sensorTemperatures.mgt.value; sensors[1].first = deviceTemperatures.mgt.isValid(); @@ -1087,7 +1087,7 @@ void ThermalController::ctrlRw() { std::array sensorTemps{}; // RW1 - thermalComponent = RW; + currThermalComponent = RW; sensors[0].first = sensorTemperatures.rw1.isValid(); sensors[0].second = sensorTemperatures.rw1.value; sensors[1].first = deviceTemperatures.rw1.isValid(); @@ -1108,7 +1108,7 @@ void ThermalController::ctrlRw() { } // RW2 - thermalComponent = RW; + currThermalComponent = RW; sensors[0].first = deviceTemperatures.rw2.isValid(); sensors[0].second = deviceTemperatures.rw2.value; sensors[1].first = deviceTemperatures.rw3.isValid(); @@ -1130,7 +1130,7 @@ void ThermalController::ctrlRw() { } } // RW3 - thermalComponent = RW; + currThermalComponent = RW; sensors[0].first = deviceTemperatures.rw3.isValid(); sensors[0].second = deviceTemperatures.rw3.value; sensors[1].first = deviceTemperatures.rw4.isValid(); @@ -1153,7 +1153,7 @@ void ThermalController::ctrlRw() { } // RW4 - thermalComponent = RW; + currThermalComponent = RW; sensors[0].first = deviceTemperatures.rw4.isValid(); sensors[0].second = deviceTemperatures.rw4.value; sensors[1].first = deviceTemperatures.rw1.isValid(); @@ -1187,7 +1187,7 @@ void ThermalController::ctrlRw() { } void ThermalController::ctrlStr() { - thermalComponent = STR; + currThermalComponent = STR; sensors[0].first = sensorTemperatures.startracker.isValid(); sensors[0].second = sensorTemperatures.startracker.value; sensors[1].first = deviceTemperatures.startracker.isValid(); @@ -1201,7 +1201,7 @@ void ThermalController::ctrlStr() { } void ThermalController::ctrlIfBoard() { - thermalComponent = IF_BOARD; + currThermalComponent = IF_BOARD; sensors[0].first = sensorTemperatures.tmp1075IfBrd.isValid(); sensors[0].second = sensorTemperatures.tmp1075IfBrd.value; sensors[1].first = sensorTemperatures.mgt.isValid(); @@ -1215,7 +1215,7 @@ void ThermalController::ctrlIfBoard() { } void ThermalController::ctrlTcsBoard() { - thermalComponent = TCS_BOARD; + currThermalComponent = TCS_BOARD; sensors[0].first = sensorTemperatures.tcsBoard.isValid(); sensors[0].second = sensorTemperatures.tcsBoard.value; sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid(); @@ -1229,7 +1229,7 @@ void ThermalController::ctrlTcsBoard() { } void ThermalController::ctrlObc() { - thermalComponent = OBC; + currThermalComponent = OBC; sensors[0].first = deviceTemperatures.q7s.isValid(); sensors[0].second = deviceTemperatures.q7s.value; sensors[1].first = sensorTemperatures.tmp1075Tcs1.isValid(); @@ -1248,7 +1248,7 @@ void ThermalController::ctrlObc() { } void ThermalController::ctrlObcIfBoard() { - thermalComponent = OBCIF_BOARD; + currThermalComponent = OBCIF_BOARD; sensors[0].first = deviceTemperatures.q7s.isValid(); sensors[0].second = deviceTemperatures.q7s.value; sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid(); @@ -1267,7 +1267,7 @@ void ThermalController::ctrlObcIfBoard() { } void ThermalController::ctrlSBandTransceiver() { - thermalComponent = SBAND_TRANSCEIVER; + currThermalComponent = SBAND_TRANSCEIVER; sensors[0].first = deviceTemperatures.syrlinksPowerAmplifier.isValid(); sensors[0].second = deviceTemperatures.syrlinksPowerAmplifier.value; sensors[1].first = deviceTemperatures.syrlinksBasebandBoard.isValid(); @@ -1285,7 +1285,7 @@ void ThermalController::ctrlSBandTransceiver() { } } void ThermalController::ctrlPcduP60Board() { - thermalComponent = PCDUP60_BOARD; + currThermalComponent = PCDUP60_BOARD; sensors[0].first = deviceTemperatures.temp1P60dock.isValid(); sensors[0].second = deviceTemperatures.temp1P60dock.value; sensors[1].first = deviceTemperatures.temp2P60dock.isValid(); @@ -1302,7 +1302,7 @@ void ThermalController::ctrlPcduP60Board() { } void ThermalController::ctrlPcduAcu() { - thermalComponent = PCDUACU; + currThermalComponent = PCDUACU; heater::Switch switchNr = heater::HEATER_1_PCDU_PDU; heater::Switch redSwitchNr = heater::HEATER_2_ACS_BRD; @@ -1318,7 +1318,7 @@ void ThermalController::ctrlPcduAcu() { } else if (sensorTemperatures.acu.isValid()) { sensorTemp = sensorTemperatures.acu.value; } else { - triggerEvent(tcsCtrl::NO_VALID_SENSOR_TEMPERATURE, thermalComponent); + triggerEvent(tcsCtrl::NO_VALID_SENSOR_TEMPERATURE, currThermalComponent); sensorTempAvailable = false; } if (sensorTempAvailable) { @@ -1335,7 +1335,7 @@ void ThermalController::ctrlPcduAcu() { } void ThermalController::ctrlPcduPdu() { - thermalComponent = PCDUPDU; + currThermalComponent = PCDUPDU; sensors[0].first = deviceTemperatures.pdu1.isValid(); sensors[0].second = deviceTemperatures.pdu1.value; sensors[1].first = deviceTemperatures.pdu2.isValid(); @@ -1354,7 +1354,7 @@ void ThermalController::ctrlPcduPdu() { } void ThermalController::ctrlPlPcduBoard() { - thermalComponent = PLPCDU_BOARD; + currThermalComponent = PLPCDU_BOARD; sensors[0].first = sensorTemperatures.tmp1075PlPcdu0.isValid(); sensors[0].second = sensorTemperatures.tmp1075PlPcdu0.value; sensors[1].first = sensorTemperatures.tmp1075PlPcdu1.isValid(); @@ -1370,7 +1370,7 @@ void ThermalController::ctrlPlPcduBoard() { } void ThermalController::ctrlPlocMissionBoard() { - thermalComponent = PLOCMISSION_BOARD; + currThermalComponent = PLOCMISSION_BOARD; sensors[0].first = sensorTemperatures.plocHeatspreader.isValid(); sensors[0].second = sensorTemperatures.plocHeatspreader.value; sensors[1].first = sensorTemperatures.plocMissionboard.isValid(); @@ -1385,7 +1385,7 @@ void ThermalController::ctrlPlocMissionBoard() { } void ThermalController::ctrlPlocProcessingBoard() { - thermalComponent = PLOCPROCESSING_BOARD; + currThermalComponent = PLOCPROCESSING_BOARD; sensors[0].first = sensorTemperatures.plocMissionboard.isValid(); sensors[0].second = sensorTemperatures.plocMissionboard.value; sensors[1].first = sensorTemperatures.plocHeatspreader.isValid(); @@ -1400,7 +1400,7 @@ void ThermalController::ctrlPlocProcessingBoard() { } void ThermalController::ctrlDac() { - thermalComponent = DAC; + currThermalComponent = DAC; sensors[0].first = sensorTemperatures.dacHeatspreader.isValid(); sensors[0].second = sensorTemperatures.dacHeatspreader.value; sensors[1].first = sensorTemperatures.plocMissionboard.isValid(); @@ -1414,7 +1414,7 @@ void ThermalController::ctrlDac() { } void ThermalController::ctrlCameraBody() { - thermalComponent = CAMERA; + currThermalComponent = CAMERA; sensors[0].first = sensorTemperatures.payload4kCamera.isValid(); sensors[0].second = sensorTemperatures.payload4kCamera.value; sensors[1].first = sensorTemperatures.dro.isValid(); @@ -1440,7 +1440,7 @@ void ThermalController::ctrlCameraBody() { } void ThermalController::ctrlDro() { - thermalComponent = DRO; + currThermalComponent = DRO; sensors[0].first = sensorTemperatures.dro.isValid(); sensors[0].second = sensorTemperatures.dro.value; sensors[1].first = sensorTemperatures.payload4kCamera.isValid(); @@ -1454,7 +1454,7 @@ void ThermalController::ctrlDro() { } void ThermalController::ctrlX8() { - thermalComponent = X8; + currThermalComponent = X8; sensors[0].first = sensorTemperatures.x8.isValid(); sensors[0].second = sensorTemperatures.x8.value; sensors[1].first = sensorTemperatures.hpa.isValid(); @@ -1468,7 +1468,7 @@ void ThermalController::ctrlX8() { } void ThermalController::ctrlTx() { - thermalComponent = TX; + currThermalComponent = TX; sensors[0].first = sensorTemperatures.eBandTx.isValid(); sensors[0].second = sensorTemperatures.eBandTx.value; sensors[1].first = sensorTemperatures.x8.isValid(); @@ -1482,7 +1482,7 @@ void ThermalController::ctrlTx() { } void ThermalController::ctrlMpa() { - thermalComponent = MPA; + currThermalComponent = MPA; sensors[0].first = sensorTemperatures.mpa.isValid(); sensors[0].second = sensorTemperatures.mpa.value; sensors[1].first = sensorTemperatures.hpa.isValid(); @@ -1496,7 +1496,7 @@ void ThermalController::ctrlMpa() { } void ThermalController::ctrlHpa() { - thermalComponent = HPA; + currThermalComponent = HPA; sensors[0].first = sensorTemperatures.hpa.isValid(); sensors[0].second = sensorTemperatures.hpa.value; sensors[1].first = sensorTemperatures.x8.isValid(); @@ -1510,7 +1510,7 @@ void ThermalController::ctrlHpa() { } void ThermalController::ctrlScexBoard() { - thermalComponent = SCEX_BOARD; + currThermalComponent = SCEX_BOARD; sensors[0].first = sensorTemperatures.scex.isValid(); sensors[0].second = sensorTemperatures.scex.value; sensors[1].first = sensorTemperatures.x8.isValid(); @@ -1601,7 +1601,7 @@ void ThermalController::ctrlComponentTemperature(HeaterContext& htrCtx) { if (chooseHeater(htrCtx.switchNr, htrCtx.redSwitchNr)) { if (heaterCtrlAllowed() and (heaterHandler.getSwitchState(htrCtx.switchNr) == HeaterHandler::SwitchState::ON)) { - heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, thermalComponent); + heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, currThermalComponent); } } } @@ -1613,19 +1613,19 @@ bool ThermalController::selectAndReadSensorTemp(HeaterContext& htrCtx) { sensors[i].second > SANITY_LIMIT_LOWER_TEMP and sensors[i].second < SANITY_LIMIT_UPPER_TEMP) { sensorTemp = sensors[i].second; - thermalStates[thermalComponent].errorCounter = 0; + thermalStates[currThermalComponent].errorCounter = 0; return true; } } - thermalStates[thermalComponent].errorCounter++; - if (thermalComponent != RW and thermalComponent != ACS_BOARD) { - if (thermalStates[thermalComponent].errorCounter <= 3) { - triggerEvent(tcsCtrl::NO_VALID_SENSOR_TEMPERATURE, thermalComponent); + thermalStates[currThermalComponent].errorCounter++; + if (currThermalComponent != RW and currThermalComponent != ACS_BOARD) { + if (thermalStates[currThermalComponent].errorCounter <= 3) { + triggerEvent(tcsCtrl::NO_VALID_SENSOR_TEMPERATURE, currThermalComponent); } } else { - if (thermalStates[thermalComponent].errorCounter <= 8) { - triggerEvent(tcsCtrl::NO_VALID_SENSOR_TEMPERATURE, thermalComponent); + if (thermalStates[currThermalComponent].errorCounter <= 8) { + triggerEvent(tcsCtrl::NO_VALID_SENSOR_TEMPERATURE, currThermalComponent); } } @@ -1658,14 +1658,14 @@ void ThermalController::heaterCtrlTempTooHighHandler(HeaterContext& htrCtx, cons return; } if (htrCtx.switchState == HeaterHandler::SwitchState::ON) { - sif::info << "TCS: Component " << static_cast(thermalComponent) << " too warm, above " + sif::info << "TCS: Component " << static_cast(currThermalComponent) << " too warm, above " << whatLimit << ", switching off heater" << std::endl; - heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, thermalComponent); + heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, currThermalComponent); heaterStates[htrCtx.switchNr].switchTransition = true; heaterStates[htrCtx.switchNr].target = HeaterHandler::SwitchState::OFF; } if (heaterHandler.getSwitchState(htrCtx.redSwitchNr) == HeaterHandler::SwitchState::ON) { - heaterSwitchHelper(htrCtx.redSwitchNr, HeaterHandler::SwitchState::OFF, thermalComponent); + heaterSwitchHelper(htrCtx.redSwitchNr, HeaterHandler::SwitchState::OFF, currThermalComponent); heaterStates[htrCtx.redSwitchNr].switchTransition = true; heaterStates[htrCtx.redSwitchNr].target = HeaterHandler::SwitchState::OFF; } @@ -1687,13 +1687,13 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) { // Heater off if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) { if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) { - sif::info << "TCS: Heater " << static_cast(thermalComponent) << " ON" << std::endl; - heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::ON, thermalComponent); + sif::info << "TCS: Heater " << static_cast(currThermalComponent) << " ON" << std::endl; + heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::ON, currThermalComponent); heaterStates[htrCtx.switchNr].switchTransition = true; heaterStates[htrCtx.switchNr].target = HeaterHandler::SwitchState::ON; } else { // Even if heater control is now allowed, we can update the state. - thermalStates[thermalComponent].heating = false; + thermalStates[currThermalComponent].heating = false; } heaterCtrlCheckUpperLimits(htrCtx); return; @@ -1701,11 +1701,12 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) { // Heater on if (htrCtx.switchState == HeaterHandler::SwitchState::ON) { - if (thermalStates[thermalComponent].heating) { + if (thermalStates[currThermalComponent].heating) { // We are already in a heating cycle, so need to check whether heating task is complete. if (sensorTemp >= htrCtx.tempLimit.opLowerLimit + TEMP_OFFSET and heaterCtrlAllowed()) { - sif::info << "TCS: Heater " << static_cast(thermalComponent) << " OFF" << std::endl; - heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, thermalComponent); + sif::info << "TCS: Heater " << static_cast(currThermalComponent) << " OFF" + << std::endl; + heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, currThermalComponent); heaterStates[htrCtx.switchNr].switchTransition = true; heaterStates[htrCtx.switchNr].target = HeaterHandler::SwitchState::OFF; } @@ -1747,7 +1748,7 @@ void ThermalController::resetSensorsArray() { validValuePair.first = false; validValuePair.second = INVALID_TEMPERATURE; } - thermalComponent = NONE; + currThermalComponent = NONE; } void ThermalController::heaterTransitionControl(const HeaterSwitchStates& currentHeaterStates) { @@ -1809,10 +1810,14 @@ void ThermalController::heaterSwitchHelper(heater::Switch switchNr, Clock::getClockMonotonic(¤tTime); if (state == HeaterHandler::SwitchState::ON) { heaterHandler.switchHeater(switchNr, state); + triggerEvent(tcsCtrl::TCS_SWITCHING_HEATER_ON, static_cast(currThermalComponent), + static_cast(switchNr)); thermalStates[componentIdx].heating = true; thermalStates[componentIdx].heaterStartTime = currentTime.tv_sec; } else { heaterHandler.switchHeater(switchNr, state); + triggerEvent(tcsCtrl::TCS_SWITCHING_HEATER_OFF, static_cast(currThermalComponent), + static_cast(switchNr)); thermalStates[componentIdx].heating = false; thermalStates[componentIdx].heaterEndTime = currentTime.tv_sec; } diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index 2518a13e..b571b950 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -256,7 +256,7 @@ class ThermalController : public ExtendedControllerBase { TempLimits scexBoardLimits = TempLimits(-60.0, -40.0, 80.0, 85.0, 150.0); double sensorTemp = INVALID_TEMPERATURE; - ThermalComponents thermalComponent = NONE; + ThermalComponents currThermalComponent = NONE; bool redSwitchNrInUse = false; MessageQueueId_t camId = MessageQueueIF::NO_QUEUE; bool componentAboveCutOffLimit = false; diff --git a/mission/controller/tcsDefs.h b/mission/controller/tcsDefs.h index e2efd98c..c77d9352 100644 --- a/mission/controller/tcsDefs.h +++ b/mission/controller/tcsDefs.h @@ -18,6 +18,10 @@ static constexpr Event CAMERA_OVERHEATING = MAKE_EVENT(5, severity::HIGH); static constexpr Event PCDU_SYSTEM_OVERHEATING = MAKE_EVENT(6, severity::HIGH); static constexpr Event HEATER_NOT_OFF_FOR_OFF_MODE = MAKE_EVENT(7, severity::MEDIUM); static constexpr Event MGT_OVERHEATING = MAKE_EVENT(8, severity::HIGH); +//! [EXPORT] : [COMMENT] P1: Module index. P2: Heater index +static constexpr Event TCS_SWITCHING_HEATER_ON = MAKE_EVENT(9, severity::INFO); +//! [EXPORT] : [COMMENT] P1: Module index. P2: Heater index +static constexpr Event TCS_SWITCHING_HEATER_OFF = MAKE_EVENT(10, severity::INFO); enum SetId : uint32_t { SENSOR_TEMPERATURES = 0, diff --git a/tmtc b/tmtc index c48f04ee..6d5bde40 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit c48f04eed5152f319b217870292968fb67b763d4 +Subproject commit 6d5bde40db69534a8cea923f96145bdeb62b79af From 785c1c65a0696d20e3c718bdf676c291144dd99f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 19:01:49 +0200 Subject: [PATCH 6/8] add new events --- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 10 ++++++++-- bsp_hosted/fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_events.csv | 2 ++ 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 +- tmtc | 2 +- 9 files changed, 32 insertions(+), 10 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 1500301f..30774cf9 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 296 translations. + * @brief Auto-generated event translation file. Contains 298 translations. * @details - * Generated on: 2023-06-21 19:01:02 + * Generated on: 2023-07-06 19:00:21 */ #include "translateEvents.h" @@ -286,6 +286,8 @@ const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING"; const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING"; const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE"; const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING"; +const char *TCS_SWITCHING_HEATER_ON_STRING = "TCS_SWITCHING_HEATER_ON"; +const char *TCS_SWITCHING_HEATER_OFF_STRING = "TCS_SWITCHING_HEATER_OFF"; const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED"; const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON"; const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION"; @@ -866,6 +868,10 @@ const char *translateEvents(Event event) { return HEATER_NOT_OFF_FOR_OFF_MODE_STRING; case (14108): return MGT_OVERHEATING_STRING; + case (14109): + return TCS_SWITCHING_HEATER_ON_STRING; + case (14110): + return TCS_SWITCHING_HEATER_OFF_STRING; case (14201): return TX_TIMER_EXPIRED_STRING; case (14202): diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index d1d0464c..c073905f 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 171 translations. - * Generated on: 2023-06-21 19:01:02 + * Generated on: 2023-07-06 19:00:21 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index 17592d1d..a26b0cdc 100644 --- a/generators/bsp_hosted_events.csv +++ b/generators/bsp_hosted_events.csv @@ -280,6 +280,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h 14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h 14108;0x371c;MGT_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h +14109;0x371d;TCS_SWITCHING_HEATER_ON;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h +14110;0x371e;TCS_SWITCHING_HEATER_OFF;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h 14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h 14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h 14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 17592d1d..a26b0cdc 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -280,6 +280,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h 14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h 14108;0x371c;MGT_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h +14109;0x371d;TCS_SWITCHING_HEATER_ON;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h +14110;0x371e;TCS_SWITCHING_HEATER_OFF;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h 14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h 14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h 14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 1500301f..30774cf9 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 296 translations. + * @brief Auto-generated event translation file. Contains 298 translations. * @details - * Generated on: 2023-06-21 19:01:02 + * Generated on: 2023-07-06 19:00:21 */ #include "translateEvents.h" @@ -286,6 +286,8 @@ const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING"; const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING"; const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE"; const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING"; +const char *TCS_SWITCHING_HEATER_ON_STRING = "TCS_SWITCHING_HEATER_ON"; +const char *TCS_SWITCHING_HEATER_OFF_STRING = "TCS_SWITCHING_HEATER_OFF"; const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED"; const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON"; const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION"; @@ -866,6 +868,10 @@ const char *translateEvents(Event event) { return HEATER_NOT_OFF_FOR_OFF_MODE_STRING; case (14108): return MGT_OVERHEATING_STRING; + case (14109): + return TCS_SWITCHING_HEATER_ON_STRING; + case (14110): + return TCS_SWITCHING_HEATER_OFF_STRING; case (14201): return TX_TIMER_EXPIRED_STRING; case (14202): diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 1ecd5e71..379265c6 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2023-06-21 19:01:02 + * Generated on: 2023-07-06 19:00:21 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 1500301f..30774cf9 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 296 translations. + * @brief Auto-generated event translation file. Contains 298 translations. * @details - * Generated on: 2023-06-21 19:01:02 + * Generated on: 2023-07-06 19:00:21 */ #include "translateEvents.h" @@ -286,6 +286,8 @@ const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING"; const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING"; const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE"; const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING"; +const char *TCS_SWITCHING_HEATER_ON_STRING = "TCS_SWITCHING_HEATER_ON"; +const char *TCS_SWITCHING_HEATER_OFF_STRING = "TCS_SWITCHING_HEATER_OFF"; const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED"; const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON"; const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION"; @@ -866,6 +868,10 @@ const char *translateEvents(Event event) { return HEATER_NOT_OFF_FOR_OFF_MODE_STRING; case (14108): return MGT_OVERHEATING_STRING; + case (14109): + return TCS_SWITCHING_HEATER_ON_STRING; + case (14110): + return TCS_SWITCHING_HEATER_OFF_STRING; case (14201): return TX_TIMER_EXPIRED_STRING; case (14202): diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 1ecd5e71..379265c6 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 175 translations. - * Generated on: 2023-06-21 19:01:02 + * Generated on: 2023-07-06 19:00:21 */ #include "translateObjects.h" diff --git a/tmtc b/tmtc index 6d5bde40..5785bbd0 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 6d5bde40db69534a8cea923f96145bdeb62b79af +Subproject commit 5785bbd0ccb045e072f347a5ff2265c610d3872c From 351c33e5043341daafff5ebac792794c19728404 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 7 Jul 2023 10:55:13 +0200 Subject: [PATCH 7/8] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f904a9..696f7293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ will consitute of a breaking change warranting a new major release: - TMP1075: Set dataset invalid on shutdown explicitely - Small fixes for TMP1075 FDIR: Use strange and missed reply counters. +# Added + +- Two events for heaters being commanded ON and OFF by the TCS controller + # [v6.0.0] 2023-07-02 - `q7s-package` version v3.2.0 From 377cc64d0fa4994b70ad3af96ce45fadfed84566 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 7 Jul 2023 10:55:39 +0200 Subject: [PATCH 8/8] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 5785bbd0..069f84d2 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5785bbd0ccb045e072f347a5ff2265c610d3872c +Subproject commit 069f84d2207c03e8d334cfce3f7dd530babe17b0