From 6767e9a5434a3e704377fcb3f461d0ea84f0d94b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 25 Jul 2023 16:32:22 +0200 Subject: [PATCH 01/14] cmake.xml --- .idea/cmake.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.idea/cmake.xml b/.idea/cmake.xml index 3be3a2b0..eff02c30 100644 --- a/.idea/cmake.xml +++ b/.idea/cmake.xml @@ -2,7 +2,7 @@ - + @@ -10,6 +10,7 @@ + \ No newline at end of file From 81bb47a6d89f7fcb305149c350e1b3c6205f9e1f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 11:05:36 +0200 Subject: [PATCH 02/14] this is a lot better --- bsp_q7s/boardtest/Q7STestTask.cpp | 27 +++-- bsp_q7s/core/CoreController.cpp | 177 ++++++------------------------ bsp_q7s/core/CoreController.h | 9 +- tmtc | 2 +- 4 files changed, 53 insertions(+), 162 deletions(-) diff --git a/bsp_q7s/boardtest/Q7STestTask.cpp b/bsp_q7s/boardtest/Q7STestTask.cpp index 50a34284..075ca1b3 100644 --- a/bsp_q7s/boardtest/Q7STestTask.cpp +++ b/bsp_q7s/boardtest/Q7STestTask.cpp @@ -218,15 +218,25 @@ void Q7STestTask::testProtHandler() { bool opPerformed = false; ReturnValue_t result = returnvalue::OK; // If any chips are unlocked, lock them here - result = coreController->setBootCopyProtection(xsc::Chip::ALL_CHIP, xsc::Copy::ALL_COPY, true, - opPerformed, true); + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_0, xsc::Copy::COPY_0, false); + if (result != returnvalue::OK) { + sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; + } + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_0, xsc::Copy::COPY_1, false); + if (result != returnvalue::OK) { + sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; + } + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_0, false); + if (result != returnvalue::OK) { + sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; + } + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } // unlock own copy - result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false, - opPerformed, true); + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } @@ -239,8 +249,7 @@ void Q7STestTask::testProtHandler() { } // lock own copy - result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true, - opPerformed, true); + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } @@ -253,8 +262,7 @@ void Q7STestTask::testProtHandler() { } // unlock specific copy - result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false, - opPerformed, true); + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } @@ -267,8 +275,7 @@ void Q7STestTask::testProtHandler() { } // lock specific copy - result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, true, - opPerformed, true); + result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, true); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 6d8f60c5..e21a6417 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -1232,16 +1232,15 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co // Attempt graceful shutdown by unmounting and switching off SD cards sdcMan->switchOffSdCard(sd::SdCard::SLOT_0); sdcMan->switchOffSdCard(sd::SdCard::SLOT_1); - // If any boot copies are unprotected. - // Actually this function only ensures that reboots to the own image are protected.. - ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true, - protOpPerformed, false); - if (result == returnvalue::OK and protOpPerformed) { + + // Ensure tha the target chip is writeprotected in any case. + bool wasProtected = handleBootCopyProt(chip, copy, true); + if (wasProtected) { // TODO: Would be nice to notify operator. But we can't use the filesystem anymore // and a reboot is imminent. Use scratch buffer? sif::info << "Running slot was writeprotected before reboot" << std::endl; } - return result; + return returnvalue::OK; } void CoreController::updateInternalSdInfo() { @@ -1274,144 +1273,50 @@ ReturnValue_t CoreController::generateChipStateFile() { return returnvalue::OK; } -ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy, - bool protect, bool &protOperationPerformed, - bool updateProtFile) { - bool allChips = false; - bool allCopies = false; - bool selfChip = false; - bool selfCopy = false; - protOperationPerformed = false; - - switch (targetChip) { - case (xsc::Chip::ALL_CHIP): { - allChips = true; - break; - } - case (xsc::Chip::NO_CHIP): { - return returnvalue::OK; - } - case (xsc::Chip::SELF_CHIP): { - selfChip = true; - targetChip = CURRENT_CHIP; - break; - } - default: { - break; - } - } - switch (targetCopy) { - case (xsc::Copy::ALL_COPY): { - allCopies = true; - break; - } - case (xsc::Copy::NO_COPY): { - return returnvalue::OK; - } - case (xsc::Copy::SELF_COPY): { - selfCopy = true; - targetCopy = CURRENT_COPY; - break; - } - default: { - break; - } +ReturnValue_t CoreController::setBootCopyProtectionAndUpdateFile(xsc::Chip targetChip, xsc::Copy targetCopy, + bool protect) { + if(targetChip == xsc::Chip::ALL_CHIP or targetCopy == xsc::Copy::ALL_COPY) { + return returnvalue::FAILED; } - for (uint8_t arrIdx = 0; arrIdx < protArray.size(); arrIdx++) { - int result = handleBootCopyProtAtIndex(targetChip, targetCopy, protect, protOperationPerformed, - selfChip, selfCopy, allChips, allCopies, arrIdx); - if (result != 0) { - break; - } - } - if (protOperationPerformed and updateProtFile) { + bool protOperationPerformed = handleBootCopyProt(targetChip, targetCopy, protect); + if (protOperationPerformed) { updateProtInfo(); } return returnvalue::OK; } -int CoreController::handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, - bool protect, bool &protOperationPerformed, - bool selfChip, bool selfCopy, bool allChips, - bool allCopies, uint8_t arrIdx) { - bool currentProt = protArray[arrIdx]; +bool CoreController::handleBootCopyProt(xsc::Chip targetChip, xsc::Copy targetCopy, + bool protect) { std::ostringstream oss; - bool performOp = false; - if (protect == currentProt) { - return 0; - } - if (protOperationPerformed) { - if ((selfChip and selfCopy) or (not allCopies and not allChips)) { - // No need to continue, only one operation was requested - return 1; - } - } - xsc::Chip currentChip; - xsc::Copy currentCopy; oss << "writeprotect "; - if (arrIdx == 0 or arrIdx == 1) { - oss << "0 "; - currentChip = xsc::Chip::CHIP_0; - } else { - oss << "1 "; - currentChip = xsc::Chip::CHIP_1; + if(targetChip == xsc::Chip::SELF_CHIP) { + targetChip = CURRENT_CHIP; } - if (arrIdx == 0 or arrIdx == 2) { + if(targetCopy == xsc::Copy::SELF_COPY) { + targetCopy = CURRENT_COPY; + } + if (targetChip == xsc::Chip::CHIP_0) { oss << "0 "; - currentCopy = xsc::Copy::COPY_0; - } else { + } else if(targetChip == xsc::Chip::SELF_CHIP) { + oss << "1 "; + } + if(targetCopy == xsc::Copy::COPY_0) { + oss << "0 "; + } else if(targetCopy == xsc::Copy::COPY_1) { oss << "1 "; - currentCopy = xsc::Copy::COPY_1; } if (protect) { oss << "1"; } else { oss << "0"; } - - int result = 0; - if (allChips and allCopies) { - performOp = true; - } else if (allChips) { - if ((selfCopy and CURRENT_COPY == targetCopy) or (currentCopy == targetCopy)) { - performOp = true; - } - } else if (allCopies) { - if ((selfChip and CURRENT_COPY == targetCopy) or (currentChip == targetChip)) { - performOp = true; - } - } else if (selfChip and (currentChip == targetChip)) { - if (selfCopy) { - if (currentCopy == targetCopy) { - performOp = true; - } - } else { - performOp = true; - } - - } else if (selfCopy and (currentCopy == targetCopy)) { - if (selfChip) { - if (currentChip == targetChip) { - performOp = true; - } - } else { - performOp = true; - } - } else if ((targetChip == currentChip) and (targetCopy == currentCopy)) { - performOp = true; + sif::info << "Executing command: " << oss.str() << std::endl; + int result = std::system(oss.str().c_str()); + if(result == 0) { + return true; } - if (result != 0) { - utility::handleSystemError(result, "CoreController::checkAndSetBootCopyProtection"); - } - if (performOp) { - // TODO: Lock operation take a long time. Use command executor? That would require a - // new state machine.. - protOperationPerformed = true; - sif::info << "Executing command: " << oss.str() << std::endl; - result = std::system(oss.str().c_str()); - } - return 0; + return false; } ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) { @@ -1456,7 +1361,6 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) { using namespace std; string word; uint8_t wordIdx = 0; - uint8_t arrayIdx = 0; istringstream iss(nextLine); xsc::Chip currentChip = xsc::Chip::CHIP_0; xsc::Copy currentCopy = xsc::Copy::COPY_0; @@ -1468,28 +1372,11 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) { currentCopy = static_cast(stoi(word)); } - if (wordIdx == 3) { - if (currentChip == xsc::Chip::CHIP_0) { - if (currentCopy == xsc::Copy::COPY_0) { - arrayIdx = 0; - } else if (currentCopy == xsc::Copy::COPY_1) { - arrayIdx = 1; - } - } - - else if (currentChip == xsc::Chip::CHIP_1) { - if (currentCopy == xsc::Copy::COPY_0) { - arrayIdx = 2; - } else if (currentCopy == xsc::Copy::COPY_1) { - arrayIdx = 3; - } - } - } if (wordIdx == 5) { if (word == "unlocked.") { - protArray[arrayIdx] = false; + protArray[currentChip][currentCopy] = false; } else { - protArray[arrayIdx] = true; + protArray[currentChip][currentCopy] = true; } } wordIdx++; diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index b6382d36..6f7b83e6 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -199,8 +199,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe * @param updateProtFile Specify whether the protection info file is updated * @return */ - ReturnValue_t setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect, - bool& protOperationPerformed, bool updateProtFile = true); + ReturnValue_t setBootCopyProtectionAndUpdateFile(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect); bool sdInitFinished() const; @@ -309,7 +308,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe * Index 2: Chip 1 Copy 0 * Index 3: Chip 1 Copy 1 */ - std::array protArray; + bool protArray[2][2] {}; PeriodicOperationDivider opDivider5; PeriodicOperationDivider opDivider10; @@ -374,9 +373,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe ReturnValue_t gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy, bool& protOpPerformed); ReturnValue_t handleProtInfoUpdateLine(std::string nextLine); - int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect, - bool& protOperationPerformed, bool selfChip, bool selfCopy, - bool allChips, bool allCopies, uint8_t arrIdx); + bool handleBootCopyProt(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect); void rebootWatchdogAlgorithm(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip, xsc::Copy& tgtCopy); void resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy); diff --git a/tmtc b/tmtc index a82cbff5..95b69541 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit a82cbff5a83eb37c68234bdeecd3b7d308d65eb1 +Subproject commit 95b69541751c9ea7146e0a342122da83bdb50f29 From 61e73a4be9fa2afeafcb38b37f433dede5815dfb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 11:07:04 +0200 Subject: [PATCH 03/14] docs --- bsp_q7s/core/CoreController.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index 6f7b83e6..8d1b066a 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -303,10 +303,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe Countdown sdCardCheckCd = Countdown(INIT_SD_CARD_CHECK_TIMEOUT); /** - * Index 0: Chip 0 Copy 0 - * Index 1: Chip 0 Copy 1 - * Index 2: Chip 1 Copy 0 - * Index 3: Chip 1 Copy 1 + * First index: Chip. + * Second index: Copy. */ bool protArray[2][2] {}; PeriodicOperationDivider opDivider5; From 4d195a1b8edf94488627cc62f96093ee7e379e80 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 11:17:26 +0200 Subject: [PATCH 04/14] bugfix --- bsp_q7s/core/CoreController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index c08e0d0f..e1b48fd2 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -1300,7 +1300,7 @@ bool CoreController::handleBootCopyProt(xsc::Chip targetChip, xsc::Copy targetCo } if (targetChip == xsc::Chip::CHIP_0) { oss << "0 "; - } else if (targetChip == xsc::Chip::SELF_CHIP) { + } else if (targetChip == xsc::Chip::CHIP_1) { oss << "1 "; } if (targetCopy == xsc::Copy::COPY_0) { From e52195e195347edfd74ab9655ed6b2404029c955 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 11:25:28 +0200 Subject: [PATCH 05/14] bugfix in test --- bsp_q7s/boardtest/Q7STestTask.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/boardtest/Q7STestTask.cpp b/bsp_q7s/boardtest/Q7STestTask.cpp index 7457b8cc..03805fde 100644 --- a/bsp_q7s/boardtest/Q7STestTask.cpp +++ b/bsp_q7s/boardtest/Q7STestTask.cpp @@ -219,22 +219,22 @@ void Q7STestTask::testProtHandler() { ReturnValue_t result = returnvalue::OK; // If any chips are unlocked, lock them here result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_0, xsc::Copy::COPY_0, - false); + true); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_0, xsc::Copy::COPY_1, - false); + true); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_0, - false); + true); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, - false); + true); if (result != returnvalue::OK) { sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl; } From 7c0ee9114bce350210cdec282e4f235f80b67d4c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 11:26:21 +0200 Subject: [PATCH 06/14] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1329d338..0a32d0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ will consitute of a breaking change warranting a new major release: from SUS and MGM measurements. To accommodate these changes, low-pass filters for SUS measurements and rates as well as MGM measurements and rates are included. Usage of the new controller as well as settings of the low-pass filters can be handled via parameter commands. +- Simplify and fix the chip and copy protection functions in the core controller. This mechanism + now is always performed for the target chip and target copy in the reboot handlers. ## Added From 6ef05767c5e933734f511de118a41c99c8f18f0a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 12:57:39 +0200 Subject: [PATCH 07/14] events and tmtc --- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 2 +- bsp_hosted/fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_events.csv | 2 +- generators/bsp_q7s_events.csv | 2 +- generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- tmtc | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 65b11c49..2899592d 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 301 translations. * @details - * Generated on: 2023-07-21 11:04:23 + * Generated on: 2023-07-26 12:51:20 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index ff7f24d8..a0002c24 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-07-21 11:04:23 + * Generated on: 2023-07-26 12:51:20 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index 61e3a82a..0cb9ba70 100644 --- a/generators/bsp_hosted_events.csv +++ b/generators/bsp_hosted_events.csv @@ -273,7 +273,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h 14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h 14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h -14014;0x36be;ACTIVE_SD_INFO;INFO;Active SD card info. 0: OFF, 1: ON, 2: MOUNTED. P1: SD Card 0, P2: SD Card 1.;mission/sysDefs.h +14014;0x36be;ACTIVE_SD_INFO;INFO;Active SD card info. SD States: 0: OFF, 1: ON, 2: MOUNTED. P1: Active SD Card Index, 0 if none is active P2: First two bytes: SD state of SD card 0, last two bytes SD state of SD card 1;mission/sysDefs.h 14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h 14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h 14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 61e3a82a..0cb9ba70 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -273,7 +273,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h 14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h 14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h -14014;0x36be;ACTIVE_SD_INFO;INFO;Active SD card info. 0: OFF, 1: ON, 2: MOUNTED. P1: SD Card 0, P2: SD Card 1.;mission/sysDefs.h +14014;0x36be;ACTIVE_SD_INFO;INFO;Active SD card info. SD States: 0: OFF, 1: ON, 2: MOUNTED. P1: Active SD Card Index, 0 if none is active P2: First two bytes: SD state of SD card 0, last two bytes SD state of SD card 1;mission/sysDefs.h 14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h 14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h 14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 65b11c49..2899592d 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 301 translations. * @details - * Generated on: 2023-07-21 11:04:23 + * Generated on: 2023-07-26 12:51:20 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 8bd6ae3d..fef8fb71 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-07-21 11:04:23 + * Generated on: 2023-07-26 12:51:20 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 65b11c49..2899592d 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 301 translations. * @details - * Generated on: 2023-07-21 11:04:23 + * Generated on: 2023-07-26 12:51:20 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 8bd6ae3d..fef8fb71 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-07-21 11:04:23 + * Generated on: 2023-07-26 12:51:20 */ #include "translateObjects.h" diff --git a/tmtc b/tmtc index 15716c98..39d6ec73 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 15716c988b6d26ae7f00e44b919d5ae7505d81ad +Subproject commit 39d6ec73c2e842530e810e854dc9a4cd1568de66 From 1f658ceee33b0ffa0abad24c058768717a793622 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 12:58:12 +0200 Subject: [PATCH 08/14] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1329d338..02e97199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v6.2.0] 2023-07-26 + +- `eive-tmtc`: v5.3.0 + ## Changed - STR missed reply handling is now moved to DHB rather than the COM interface. The COM IF will From 55c5df0519b5ce6ac2ba1cd09e918f03e537fe50 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 13:07:14 +0200 Subject: [PATCH 09/14] ensure downwards compatibilitiy for enum --- mission/acs/defs.h | 18 ++++++++++++------ tmtc | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/mission/acs/defs.h b/mission/acs/defs.h index c02b692c..a1118ebc 100644 --- a/mission/acs/defs.h +++ b/mission/acs/defs.h @@ -26,12 +26,18 @@ enum SafeModeStrategy : uint8_t { SAFECTRL_OFF = 0, SAFECTRL_NO_MAG_FIELD_FOR_CONTROL = 1, SAFECTRL_NO_SENSORS_FOR_CONTROL = 2, - SAFECTRL_MEKF = 10, - SAFECTRL_GYR = 11, - SAFECTRL_SUSMGM = 12, - SAFECTRL_ECLIPSE_DAMPING_GYR = 13, - SAFECTRL_ECLIPSE_DAMPING_SUSMGM = 14, - SAFECTRL_ECLIPSE_IDELING = 15, + // OBSW version <= v6.1.0 + LEGACY_ACTIVE_MEKF = 10, + LEGACY_SAFECTRL_WITHOUT_MEKF = 11, + LEGACY_SAFECTRL_ECLIPSE_DAMPING = 12, + LEGACY_SAFECTRL_ECLIPSE_IDELING = 13, + // Added in v6.2.0 + SAFECTRL_MEKF = 14, + SAFECTRL_GYR = 15, + SAFECTRL_SUSMGM = 16, + SAFECTRL_ECLIPSE_DAMPING_GYR = 17, + SAFECTRL_ECLIPSE_DAMPING_SUSMGM = 18, + SAFECTRL_ECLIPSE_IDELING = 19, SAFECTRL_DETUMBLE_FULL = 20, SAFECTRL_DETUMBLE_DETERIORATED = 21, }; diff --git a/tmtc b/tmtc index 15716c98..39d6ec73 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 15716c988b6d26ae7f00e44b919d5ae7505d81ad +Subproject commit 39d6ec73c2e842530e810e854dc9a4cd1568de66 From 91208c28080bf9d1775335e9a3674751d72291ca Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 13:17:54 +0200 Subject: [PATCH 10/14] bump tmtc, small tweak for definitions --- mission/acs/defs.h | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mission/acs/defs.h b/mission/acs/defs.h index a1118ebc..677ce37a 100644 --- a/mission/acs/defs.h +++ b/mission/acs/defs.h @@ -27,7 +27,7 @@ enum SafeModeStrategy : uint8_t { SAFECTRL_NO_MAG_FIELD_FOR_CONTROL = 1, SAFECTRL_NO_SENSORS_FOR_CONTROL = 2, // OBSW version <= v6.1.0 - LEGACY_ACTIVE_MEKF = 10, + LEGACY_SAFECTRL_ACTIVE_MEKF = 10, LEGACY_SAFECTRL_WITHOUT_MEKF = 11, LEGACY_SAFECTRL_ECLIPSE_DAMPING = 12, LEGACY_SAFECTRL_ECLIPSE_IDELING = 13, diff --git a/tmtc b/tmtc index 39d6ec73..a55aa4a6 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 39d6ec73c2e842530e810e854dc9a4cd1568de66 +Subproject commit a55aa4a6679eb0b7a7731063722b9549b8eaf358 From 3ebb83b4c029be786357e8bca11d9b29cf8b251c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 13:18:36 +0200 Subject: [PATCH 11/14] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62b446d7..01c4e65b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release: # [v6.2.0] 2023-07-26 -- `eive-tmtc`: v5.3.0 +- `eive-tmtc`: v5.3.1 ## Changed From f7dccdc4c65eb216a7d0f7210b3dbca118b983c9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 13:20:32 +0200 Subject: [PATCH 12/14] bump tmtc again --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index a55aa4a6..cbcc06ed 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit a55aa4a6679eb0b7a7731063722b9549b8eaf358 +Subproject commit cbcc06ede704d36e1558aae922092470fee5ff66 From a0735b4fffde22fd0011af40d74dcee028f9f38e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 13:37:21 +0200 Subject: [PATCH 13/14] bump minor version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7b5013c..6ffaf32f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 6) -set(OBSW_VERSION_MINOR 1) +set(OBSW_VERSION_MINOR 2) set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) From 1ae2f692ba578da07b40845e63234a48bfdf0fe3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 26 Jul 2023 14:32:13 +0200 Subject: [PATCH 14/14] HK generation is countdown based --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c4e65b..de576ea6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ will consitute of a breaking change warranting a new major release: controller as well as settings of the low-pass filters can be handled via parameter commands. - Simplify and fix the chip and copy protection functions in the core controller. This mechanism now is always performed for the target chip and target copy in the reboot handlers. +- Improvement in FSFW: HK generation is now countdown based. ## Added