From b1c4241b03f4ef5d7ff508276c992b75e06f97ce Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 10 Mar 2023 11:55:18 +0100 Subject: [PATCH 01/10] changed perform operation --- mission/controller/AcsController.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 25ad8706..bc0fa754 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -112,13 +112,16 @@ void AcsController::performControlOperation() { } case InternalState::READY: { if (mode != MODE_OFF) { - switch (submode) { + switch (mode) { case acs::SAFE: - performSafe(); - break; - case acs::DETUMBLE: - performDetumble(); - break; + switch (submode) { + case SUBMODE_NONE: + performSafe(); + break; + case acs::DETUMBLE: + performDetumble(); + break; + } case acs::PTG_IDLE: case acs::PTG_TARGET: case acs::PTG_TARGET_GS: From 170976566b9e0ce2d6545790faa3249a6eceda46 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 10 Mar 2023 12:11:10 +0100 Subject: [PATCH 02/10] acsCtrl does not allow ON or NORMAL anymore --- mission/acsDefs.h | 12 ++++++------ mission/controller/AcsController.cpp | 10 ++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/mission/acsDefs.h b/mission/acsDefs.h index 9b7916af..f824efbf 100644 --- a/mission/acsDefs.h +++ b/mission/acsDefs.h @@ -10,12 +10,12 @@ namespace acs { enum AcsMode : Mode_t { OFF = HasModesIF::MODE_OFF, SAFE = 10, - DETUMBLE = 11, - PTG_IDLE = 12, - PTG_NADIR = 13, - PTG_TARGET = 14, - PTG_TARGET_GS = 15, - PTG_INERTIAL = 16, + PTG_IDLE = 11, + PTG_NADIR = 12, + PTG_TARGET = 13, + PTG_TARGET_GS = 14, + PTG_INERTIAL = 15, + DETUMBLE = 20, }; // static constexpr uint8_t ACS_SYSTEM_DETUMBLE_SUBMODE = 1; diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index bc0fa754..9ae0ed7d 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -639,8 +639,14 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode, } else { return INVALID_SUBMODE; } - } else if ((mode == MODE_ON) || (mode == MODE_NORMAL)) { - if ((submode < acs::AcsMode::SAFE) or (submode > acs::AcsMode::PTG_INERTIAL)) { + } else if (not((mode < acs::AcsMode::SAFE) or (mode > acs::AcsMode::PTG_INERTIAL))) { + if (mode == acs::AcsMode::SAFE) { + if (not((submode == SUBMODE_NONE) or (submode == acs::AcsMode::DETUMBLE))) { + return INVALID_SUBMODE; + } else { + return returnvalue::OK; + } + } else if (not(submode == SUBMODE_NONE)) { return INVALID_SUBMODE; } else { return returnvalue::OK; From ba0bc1b98b0c69064ebb2a2e687ae54644d8fcea Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 10 Mar 2023 12:46:26 +0100 Subject: [PATCH 03/10] anounce mode changes --- mission/controller/AcsController.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 9ae0ed7d..fbe57395 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -663,12 +663,15 @@ void AcsController::announceMode(bool recursive) { const char *modeStr = "UNKNOWN"; if (mode == HasModesIF::MODE_OFF) { modeStr = "OFF"; - } else if (mode == HasModesIF::MODE_ON) { - modeStr = "ON"; - } else if (mode == DeviceHandlerIF::MODE_NORMAL) { - modeStr = "NORMAL"; + } else { + *modeStr = acs::getModeStr(static_cast(mode)); + } + const char *submodeStr = "UNKNOWN"; + if (submode == HasModesIF::SUBMODE_NONE) { + submodeStr = "NONE"; + } else { + *submodeStr = acs::getModeStr(static_cast(mode)); } - const char *submodeStr = acs::getModeStr(static_cast(submode)); sif::info << "ACS controller is now in " << modeStr << " mode with " << submodeStr << " submode" << std::endl; return ExtendedControllerBase::announceMode(recursive); From c80426309d32a38f0fda56f51a692297083a31cf Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 10 Mar 2023 12:50:18 +0100 Subject: [PATCH 04/10] fixed automatic switch between safe and detumble --- mission/system/objects/AcsSubsystem.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/mission/system/objects/AcsSubsystem.cpp b/mission/system/objects/AcsSubsystem.cpp index 3bab5273..2221c7e8 100644 --- a/mission/system/objects/AcsSubsystem.cpp +++ b/mission/system/objects/AcsSubsystem.cpp @@ -42,16 +42,6 @@ ReturnValue_t AcsSubsystem::initialize() { if (result != returnvalue::OK) { sif::error << "AcsSubsystem: Subscribing for acs::SAFE_RATE_RECOVERY failed" << std::endl; } - result = - manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::MULTIPLE_RW_INVALID)); - if (result != returnvalue::OK) { - sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl; - } - result = manager->subscribeToEvent(eventQueue->getId(), - event::getEventId(acs::MEKF_INVALID_MODE_VIOLATION)); - if (result != returnvalue::OK) { - sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl; - } return Subsystem::initialize(); } @@ -70,7 +60,7 @@ void AcsSubsystem::handleEventMessages() { case EventMessage::EVENT_MESSAGE: if (event.getEvent() == acs::SAFE_RATE_VIOLATION) { CommandMessage msg; - ModeMessage::setCmdModeMessage(msg, acs::AcsMode::DETUMBLE, 0); + ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::AcsMode::DETUMBLE); status = commandQueue->sendMessage(commandQueue->getId(), &msg); if (result != returnvalue::OK) { sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl; @@ -78,7 +68,7 @@ void AcsSubsystem::handleEventMessages() { } if (event.getEvent() == acs::SAFE_RATE_RECOVERY) { CommandMessage msg; - ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, 0); + ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, SUBMODE_NONE); status = commandQueue->sendMessage(commandQueue->getId(), &msg); if (status != returnvalue::OK) { sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl; From c85c2cf4b66f1842452b51457d6637c296a7f66c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 10 Mar 2023 13:17:46 +0100 Subject: [PATCH 05/10] this should be it for OBSW --- mission/acsDefs.cpp | 4 -- mission/acsDefs.h | 3 +- mission/controller/AcsController.cpp | 12 ++-- mission/system/objects/AcsSubsystem.cpp | 4 +- mission/system/objects/EiveSystem.cpp | 4 -- mission/system/tree/acsModeTree.cpp | 95 ++++--------------------- mission/system/tree/system.cpp | 7 +- 7 files changed, 28 insertions(+), 101 deletions(-) diff --git a/mission/acsDefs.cpp b/mission/acsDefs.cpp index 00686b15..4027896c 100644 --- a/mission/acsDefs.cpp +++ b/mission/acsDefs.cpp @@ -11,10 +11,6 @@ const char* acs::getModeStr(AcsMode mode) { modeStr = "SAFE"; break; } - case (acs::AcsMode::DETUMBLE): { - modeStr = "DETUBMLE"; - break; - } case (acs::AcsMode::PTG_NADIR): { modeStr = "POITNING NADIR"; break; diff --git a/mission/acsDefs.h b/mission/acsDefs.h index f824efbf..a724bbd7 100644 --- a/mission/acsDefs.h +++ b/mission/acsDefs.h @@ -15,9 +15,10 @@ enum AcsMode : Mode_t { PTG_TARGET = 13, PTG_TARGET_GS = 14, PTG_INERTIAL = 15, - DETUMBLE = 20, }; +enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 }; + // static constexpr uint8_t ACS_SYSTEM_DETUMBLE_SUBMODE = 1; static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM; diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index fbe57395..2ff5547b 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -641,7 +641,7 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode, } } else if (not((mode < acs::AcsMode::SAFE) or (mode > acs::AcsMode::PTG_INERTIAL))) { if (mode == acs::AcsMode::SAFE) { - if (not((submode == SUBMODE_NONE) or (submode == acs::AcsMode::DETUMBLE))) { + if (not((submode == SUBMODE_NONE) or (submode == acs::SafeSubmode::DETUMBLE))) { return INVALID_SUBMODE; } else { return returnvalue::OK; @@ -664,13 +664,17 @@ void AcsController::announceMode(bool recursive) { if (mode == HasModesIF::MODE_OFF) { modeStr = "OFF"; } else { - *modeStr = acs::getModeStr(static_cast(mode)); + modeStr = acs::getModeStr(static_cast(mode)); } const char *submodeStr = "UNKNOWN"; if (submode == HasModesIF::SUBMODE_NONE) { submodeStr = "NONE"; - } else { - *submodeStr = acs::getModeStr(static_cast(mode)); + } + if (mode == acs::AcsMode::SAFE) { + acs::SafeSubmode safeSubmode = static_cast(this->submode); + if (safeSubmode == acs::SafeSubmode::DETUMBLE) { + submodeStr = "DETUMBLE"; + } } sif::info << "ACS controller is now in " << modeStr << " mode with " << submodeStr << " submode" << std::endl; diff --git a/mission/system/objects/AcsSubsystem.cpp b/mission/system/objects/AcsSubsystem.cpp index 2221c7e8..d407f2e8 100644 --- a/mission/system/objects/AcsSubsystem.cpp +++ b/mission/system/objects/AcsSubsystem.cpp @@ -60,7 +60,7 @@ void AcsSubsystem::handleEventMessages() { case EventMessage::EVENT_MESSAGE: if (event.getEvent() == acs::SAFE_RATE_VIOLATION) { CommandMessage msg; - ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::AcsMode::DETUMBLE); + ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::SafeSubmode::DETUMBLE); status = commandQueue->sendMessage(commandQueue->getId(), &msg); if (result != returnvalue::OK) { sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl; @@ -68,7 +68,7 @@ void AcsSubsystem::handleEventMessages() { } if (event.getEvent() == acs::SAFE_RATE_RECOVERY) { CommandMessage msg; - ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, SUBMODE_NONE); + ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT); status = commandQueue->sendMessage(commandQueue->getId(), &msg); if (status != returnvalue::OK) { sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl; diff --git a/mission/system/objects/EiveSystem.cpp b/mission/system/objects/EiveSystem.cpp index 26707bf1..65711706 100644 --- a/mission/system/objects/EiveSystem.cpp +++ b/mission/system/objects/EiveSystem.cpp @@ -17,10 +17,6 @@ void EiveSystem::announceMode(bool recursive) { modeStr = "SAFE"; break; } - case (acs::AcsMode::DETUMBLE): { - modeStr = "DETUBMLE"; - break; - } case (acs::AcsMode::PTG_IDLE): { modeStr = "POINTING IDLE"; break; diff --git a/mission/system/tree/acsModeTree.cpp b/mission/system/tree/acsModeTree.cpp index ce419d0b..95effa7f 100644 --- a/mission/system/tree/acsModeTree.cpp +++ b/mission/system/tree/acsModeTree.cpp @@ -20,7 +20,6 @@ namespace { const auto check = subsystem::checkInsert; void buildOffSequence(Subsystem& ss, ModeListEntry& eh); -void buildDetumbleSequence(Subsystem& ss, ModeListEntry& entryHelper); void buildSafeSequence(Subsystem& ss, ModeListEntry& entryHelper); void buildIdleSequence(Subsystem& ss, ModeListEntry& entryHelper); void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh); @@ -43,15 +42,6 @@ auto ACS_TABLE_OFF_TRANS_0 = auto ACS_TABLE_OFF_TRANS_1 = std::make_pair((acs::AcsMode::OFF << 24) | 3, FixedArrayList()); -auto ACS_SEQUENCE_DETUMBLE = - std::make_pair(acs::AcsMode::DETUMBLE, FixedArrayList()); -auto ACS_TABLE_DETUMBLE_TGT = - std::make_pair((acs::AcsMode::DETUMBLE << 24) | 1, FixedArrayList()); -auto ACS_TABLE_DETUMBLE_TRANS_0 = - std::make_pair((acs::AcsMode::DETUMBLE << 24) | 2, FixedArrayList()); -auto ACS_TABLE_DETUMBLE_TRANS_1 = - std::make_pair((acs::AcsMode::DETUMBLE << 24) | 3, FixedArrayList()); - auto ACS_SEQUENCE_SAFE = std::make_pair(acs::AcsMode::SAFE, FixedArrayList()); auto ACS_TABLE_SAFE_TGT = std::make_pair((acs::AcsMode::SAFE << 24) | 1, FixedArrayList()); @@ -130,7 +120,6 @@ Subsystem& satsystem::acs::init() { buildOffSequence(ACS_SUBSYSTEM, entry); buildSafeSequence(ACS_SUBSYSTEM, entry); - buildDetumbleSequence(ACS_SUBSYSTEM, entry); buildIdleSequence(ACS_SUBSYSTEM, entry); buildTargetPtSequence(ACS_SUBSYSTEM, entry); buildTargetPtGsSequence(ACS_SUBSYSTEM, entry); @@ -206,8 +195,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) { eh.setCheckSuccess(checkSuccess); check(sequence.insert(eh), ctxc); }; - // Build SAFE target - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::SAFE, ACS_TABLE_SAFE_TGT.second); + // Build SAFE target. Allow detumble submode. + iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, 0, ACS_TABLE_SAFE_TGT.second, true); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true); @@ -225,7 +214,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) { // SUS board transition table is defined above // Build SAFE transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::SAFE, ACS_TABLE_SAFE_TRANS_1.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT, + ACS_TABLE_SAFE_TRANS_1.second); check(ss.addTable(&ACS_TABLE_SAFE_TRANS_1.second, ACS_TABLE_SAFE_TRANS_1.first, false, true), ctxc); @@ -238,61 +228,6 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) { ctxc); } -void buildDetumbleSequence(Subsystem& ss, ModeListEntry& eh) { - std::string context = "satsystem::acs::buildDetumbleSequence"; - auto ctxc = context.c_str(); - // Insert Helper Table - auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, - ArrayList& sequence, bool allowAllSubmodes = false) { - eh.setObject(obj); - eh.setMode(mode); - eh.setSubmode(submode); - if (allowAllSubmodes) { - eh.allowAllSubmodes(); - } - check(sequence.insert(eh), ctxc); - }; - // Insert Helper Sequence - auto ihs = [&](ArrayList& sequence, Mode_t tableId, uint32_t waitSeconds, - bool checkSuccess) { - eh.setTableId(tableId); - eh.setWaitSeconds(waitSeconds); - eh.setCheckSuccess(checkSuccess); - check(sequence.insert(eh), ctxc); - }; - // Build DETUMBLE target - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::DETUMBLE, ACS_TABLE_DETUMBLE_TGT.second); - iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_DETUMBLE_TGT.second); - iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second, true); - iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second, true); - check(ss.addTable(&ACS_TABLE_DETUMBLE_TGT.second, ACS_TABLE_DETUMBLE_TGT.first, false, true), - ctxc); - - // Build DETUMBLE transition 0 - iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second); - iht(objects::ACS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_DETUMBLE_TRANS_0.second, true); - iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_DETUMBLE_TRANS_0.second, true); - iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second); - iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second); - check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false, - true), - ctxc); - - // Build DETUMBLE transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::DETUMBLE, ACS_TABLE_DETUMBLE_TRANS_1.second); - check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_1.second, ACS_TABLE_DETUMBLE_TRANS_1.first, false, - true), - ctxc); - - // Build DETUMBLE sequence - ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TGT.first, 0, true); - ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_0.first, 0, false); - ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_1.first, 0, false); - check(ss.addSequence(&ACS_SEQUENCE_DETUMBLE.second, ACS_SEQUENCE_DETUMBLE.first, - ACS_SEQUENCE_SAFE.first, false, true), - ctxc); -} - void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) { std::string context = "satsystem::acs::buildIdleSequence"; auto ctxc = context.c_str(); @@ -316,7 +251,7 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) { check(sequence.insert(eh), ctxc); }; // Build IDLE target - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_IDLE, ACS_TABLE_IDLE_TGT.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_IDLE, 0, ACS_TABLE_IDLE_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second); @@ -333,7 +268,7 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) { ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true); // Build IDLE transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_IDLE, ACS_TABLE_IDLE_TRANS_1.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_IDLE, 0, ACS_TABLE_IDLE_TRANS_1.second); ss.addTable(&ACS_TABLE_IDLE_TRANS_1.second, ACS_TABLE_IDLE_TRANS_1.first, false, true); // Build IDLE sequence @@ -368,7 +303,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) { }; // Build TARGET PT table - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET, ACS_TABLE_PTG_TARGET_TGT.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second, true); @@ -379,7 +314,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) { // Transition 0 already built // Build TARGET PT transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET, ACS_TABLE_PTG_TARGET_TRANS_1.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TRANS_1.second); check(ss.addTable(&ACS_TABLE_PTG_TARGET_TRANS_1.second, ACS_TABLE_PTG_TARGET_TRANS_1.first, false, true), ctxc); @@ -417,8 +352,7 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) { }; // Build TARGET PT table - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET, - ACS_TABLE_PTG_TARGET_NADIR_TGT.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true); @@ -430,7 +364,7 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) { // Transition 0 already built // Build TARGET PT transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_NADIR, + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TRANS_1.second); check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_NADIR_TRANS_1.first, &ACS_TABLE_PTG_TARGET_NADIR_TRANS_1.second)), @@ -471,8 +405,7 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) { }; // Build TARGET PT table - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET_GS, - ACS_TABLE_PTG_TARGET_GS_TGT.second); + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second, true); @@ -484,7 +417,7 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) { // Transition 0 already built // Build TARGET PT transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET_GS, + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TRANS_1.second); check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_GS_TRANS_1.first, &ACS_TABLE_PTG_TARGET_GS_TRANS_1.second)), @@ -524,7 +457,7 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) { }; // Build TARGET PT table - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_INERTIAL, + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second, true); @@ -537,7 +470,7 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) { // Transition 0 already built // Build TARGET PT transition 1 - iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_INERTIAL, + iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TRANS_1.second); check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_INERTIAL_TRANS_1.first, &ACS_TABLE_PTG_TARGET_INERTIAL_TRANS_1.second)), diff --git a/mission/system/tree/system.cpp b/mission/system/tree/system.cpp index a7814fa1..dde32aef 100644 --- a/mission/system/tree/system.cpp +++ b/mission/system/tree/system.cpp @@ -82,11 +82,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) { check(sequence.insert(eh), ctxc); }; - // Do no track ACS for now because it might jump to detumble mode and back to safe as part of - // normal operations. - // UPDATE: This could be re-enabled as soon as the detumble mode is a submode of - // ACS CTRL safe mode. - // iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true); + // Do no track submode to allow transitions to DETUMBLE submode. + iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true); iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TGT.second); check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc); From 0b09816b4af89f848430b528419499eadfbdae58 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 10 Mar 2023 13:37:31 +0100 Subject: [PATCH 06/10] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index b0f51072..a249d718 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit b0f51072b20e4835a3e2143d8b3fb40d14240bfb +Subproject commit a249d7184011e2c739b5145f4dff74dccaa7020d From 2f4f7f088e1c74a3c182efc441b3643f26e84a54 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 10 Mar 2023 13:58:50 +0100 Subject: [PATCH 07/10] add missing break --- mission/controller/AcsController.cpp | 1 + tmtc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 2ff5547b..ff0aa008 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -122,6 +122,7 @@ void AcsController::performControlOperation() { performDetumble(); break; } + break; case acs::PTG_IDLE: case acs::PTG_TARGET: case acs::PTG_TARGET_GS: diff --git a/tmtc b/tmtc index a249d718..d5685adb 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit a249d7184011e2c739b5145f4dff74dccaa7020d +Subproject commit d5685adb48c3b49eb923beaa2137705ec6d9db4d From 37a32bb6e953ad0d7e0f0d00becf243eec1b8646 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 10 Mar 2023 14:37:02 +0100 Subject: [PATCH 08/10] bump deps --- fsfw | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fsfw b/fsfw index 23d9b44b..c162acb7 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 23d9b44b3e02bb0d35e4622d125b48e9b44fee2c +Subproject commit c162acb7df6102e304057dcdda4fb93285052f03 diff --git a/tmtc b/tmtc index d5685adb..9f905524 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit d5685adb48c3b49eb923beaa2137705ec6d9db4d +Subproject commit 9f905524b6f2b10b1e8bcd9139c21a206cdf8aa3 From 2e431668dd50067a5f9267a1c002ffdaef2a1e2b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 10 Mar 2023 14:59:52 +0100 Subject: [PATCH 09/10] larger event queues now --- CHANGELOG.md | 3 ++- fsfw | 2 +- mission/core/GenericFactory.cpp | 6 +++--- mission/system/tree/acsModeTree.cpp | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8e4aaca..cb7c3c65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ will consitute of a breaking change warranting a new major release: sometimes blocking for a long time. - Request raw MTM measurement twice for IMTQ, might reduce number of times measurement could not be retrieved. - +- Event manager and event service have larger queues now: 45 -> 120 for Service 5, 80 -> 120 for + evebt manager # [v1.36.0] 2023-03-08 eive-tmtc: v2.17.2 diff --git a/fsfw b/fsfw index c162acb7..4d6f6e6b 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit c162acb7df6102e304057dcdda4fb93285052f03 +Subproject commit 4d6f6e6b23b5c0486dad6be8abba7681114a05fe diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index c6a3e216..e8eb9210 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -86,7 +86,7 @@ EiveFaultHandler EIVE_FAULT_HANDLER; void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFunnel** pusFunnel, CfdpTmFunnel** cfdpFunnel, SdCardMountedIF& sdcMan) { // Framework objects - new EventManager(objects::EVENT_MANAGER); + new EventManager(objects::EVENT_MANAGER, 120); auto healthTable = new HealthTable(objects::HEALTH_TABLE); if (healthTable_ != nullptr) { *healthTable_ = healthTable; @@ -162,14 +162,14 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun // PUS service stack new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, config::EIVE_PUS_APID, - pus::PUS_SERVICE_1, objects::PUS_TM_FUNNEL, 20); + pus::PUS_SERVICE_1, objects::PUS_TM_FUNNEL, 40); new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, config::EIVE_PUS_APID, pus::PUS_SERVICE_2, 3, 10); new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, config::EIVE_PUS_APID, pus::PUS_SERVICE_3); new Service5EventReporting( PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5), - 15, 45); + 15, 120); new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, config::EIVE_PUS_APID, pus::PUS_SERVICE_8, 16, 60); new Service9TimeManagement( diff --git a/mission/system/tree/acsModeTree.cpp b/mission/system/tree/acsModeTree.cpp index 95effa7f..9b0c573a 100644 --- a/mission/system/tree/acsModeTree.cpp +++ b/mission/system/tree/acsModeTree.cpp @@ -196,7 +196,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) { check(sequence.insert(eh), ctxc); }; // Build SAFE target. Allow detumble submode. - iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, 0, ACS_TABLE_SAFE_TGT.second, true); + iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT, + ACS_TABLE_SAFE_TGT.second, true); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second); iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true); From b6fc9d65b7852c3fc6fa0c38aba4f72424beebf4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 10 Mar 2023 15:01:59 +0100 Subject: [PATCH 10/10] changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb7c3c65..35890493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,10 @@ will consitute of a breaking change warranting a new major release: - Request raw MTM measurement twice for IMTQ, might reduce number of times measurement could not be retrieved. - Event manager and event service have larger queues now: 45 -> 120 for Service 5, 80 -> 120 for - evebt manager + event manager +- ACS mode changes: The ACS CTRL submodes are now modes. DETUBMLE is now submode of SAFE mode. +- EIVE system now tracks the mode of the ACS subsyste in SAFE mode. + # [v1.36.0] 2023-03-08 eive-tmtc: v2.17.2