From aec383b97434346a954e3834c851dffea1ea143c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 6 Jun 2023 11:11:16 +0200 Subject: [PATCH 01/17] add force flag for cp helper --- bsp_q7s/core/CoreController.cpp | 3 +++ mission/sysDefs.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 5c4c4d62..2aaef9a5 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -243,6 +243,9 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_ return result; } std::ostringstream oss("cp ", std::ostringstream::ate); + if (parser.isForceOptSet()) { + oss << "-f "; + } if (parser.isRecursiveOptSet()) { oss << "-r "; } diff --git a/mission/sysDefs.h b/mission/sysDefs.h index c84c237f..f1de95a3 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -242,19 +242,22 @@ class CpHelperParser { CpHelperParser(const uint8_t* data, size_t maxLen) : data(data), maxLen(maxLen) {} ReturnValue_t parse() { - if (maxLen < 1) { + if (maxLen < 2) { return SerializeIF::STREAM_TOO_SHORT; } recursiveOpt = data[0]; + forceOpt = data[1]; return parseDestTargetString(data + 1, maxLen - 1, destTgt); } const SourceTargetPair& destTgtPair() const { return destTgt; } bool isRecursiveOptSet() const { return recursiveOpt; } + bool isForceOptSet() const { return forceOpt; } private: const uint8_t* data; size_t maxLen; bool recursiveOpt = false; + bool forceOpt = false; SourceTargetPair destTgt; }; From 5058b8905d555004f655816df1910fd50e450cda Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 6 Jun 2023 14:05:44 +0200 Subject: [PATCH 02/17] let's not forget this --- mission/sysDefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/sysDefs.h b/mission/sysDefs.h index f1de95a3..9f402226 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -247,7 +247,7 @@ class CpHelperParser { } recursiveOpt = data[0]; forceOpt = data[1]; - return parseDestTargetString(data + 1, maxLen - 1, destTgt); + return parseDestTargetString(data + 2, maxLen - 2, destTgt); } const SourceTargetPair& destTgtPair() const { return destTgt; } bool isRecursiveOptSet() const { return recursiveOpt; } From af8b4d5bc8e324e6187f6c78ae1301a936a724f2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 21 Jun 2023 13:53:34 +0200 Subject: [PATCH 03/17] remove commented code --- bsp_q7s/em/emObjectFactory.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 5270e887..e8cd595d 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -83,21 +83,6 @@ void ObjectFactory::produce(void* args) { new CoreController(objects::CORE_CONTROLLER, enableHkSets); - // Regular FM code, does not work for EM if the hardware is not connected - // createPcduComponents(gpioComIF, &pwrSwitcher); - // createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher); - // createSyrlinksComponents(pwrSwitcher); - // createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV); - // createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF); - // createTmpComponents(); - // createSolarArrayDeploymentComponents(); - // createPayloadComponents(gpioComIF); - // createHeaterComponents(gpioComIF, pwrSwitcher, healthTable); - - // TODO: Careful! Switching this on somehow messes with the communication with the ProASIC - // and will cause xsc_boot_copy commands to always boot to 0 0 - // createRadSensorComponent(gpioComIF); - #if OBSW_ADD_ACS_BOARD == 1 // Still initialize chip select to avoid SPI bus issues. createRadSensorChipSelect(gpioComIF); From 4893af07ae0764cbbef5656a0406474752c95800 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 21 Jun 2023 13:59:15 +0200 Subject: [PATCH 04/17] extend RW dummy --- dummies/RwDummy.cpp | 23 ++++++++++++++++++++--- dummies/RwDummy.h | 6 ++++++ mission/tmtc/PersistentTmStore.cpp | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/dummies/RwDummy.cpp b/dummies/RwDummy.cpp index 60652ef7..0bf4db42 100644 --- a/dummies/RwDummy.cpp +++ b/dummies/RwDummy.cpp @@ -3,13 +3,24 @@ #include RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) - : DeviceHandlerBase(objectId, comif, comCookie) {} + : DeviceHandlerBase(objectId, comif, comCookie), + + statusSet(this), + lastResetStatusSet(this), + tmDataset(this), + rwSpeedActuationSet(*this) {} RwDummy::~RwDummy() {} -void RwDummy::doStartUp() { setMode(MODE_ON); } +void RwDummy::doStartUp() { + statusSet.setReportingEnabled(true); + setMode(MODE_ON); +} -void RwDummy::doShutDown() { setMode(MODE_OFF); } +void RwDummy::doShutDown() { + statusSet.setReportingEnabled(false); + setMode(MODE_OFF); +} ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } @@ -74,5 +85,11 @@ ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoo localDataPoolMap.emplace(rws::SPI_BYTES_READ, new PoolEntry({0})); localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry({0})); localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry({0})); + poolManager.subscribeForDiagPeriodicPacket( + subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(lastResetStatusSet.getSid(), false, 30.0)); return returnvalue::OK; } diff --git a/dummies/RwDummy.h b/dummies/RwDummy.h index 5673717a..03629937 100644 --- a/dummies/RwDummy.h +++ b/dummies/RwDummy.h @@ -2,6 +2,7 @@ #define DUMMIES_RWDUMMY_H_ #include +#include class RwDummy : public DeviceHandlerBase { public: @@ -15,6 +16,11 @@ class RwDummy : public DeviceHandlerBase { virtual ~RwDummy(); protected: + rws::StatusSet statusSet; + rws::LastResetSatus lastResetStatusSet; + rws::TmDataset tmDataset; + rws::RwSpeedActuationSet rwSpeedActuationSet; + PoolEntry rwSpeed = PoolEntry({0}); PoolEntry rampTime = PoolEntry({10}); diff --git a/mission/tmtc/PersistentTmStore.cpp b/mission/tmtc/PersistentTmStore.cpp index b264b1c8..08a7ea45 100644 --- a/mission/tmtc/PersistentTmStore.cpp +++ b/mission/tmtc/PersistentTmStore.cpp @@ -268,7 +268,7 @@ ReturnValue_t PersistentTmStore::getNextDumpPacket(PusTmReader& reader, bool& fi // restore the file dump, but for now do not trust the file. std::error_code e; std::filesystem::remove(dumpParams.dirEntry.path().c_str(), e); - if(dumpParams.dirEntry.path() == activeFile) { + if (dumpParams.dirEntry.path() == activeFile) { activeFile == std::nullopt; assignAndOrCreateMostRecentFile(); } From 3f9bf8e1731d9a06897ee7a34ebf06874a13392b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 21 Jun 2023 14:29:00 +0200 Subject: [PATCH 05/17] make imtq dummy more similar --- dummies/ImtqDummy.cpp | 43 ++++++++++++++++++++++++++++++++++--------- dummies/ImtqDummy.h | 16 +++++++++++++--- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/dummies/ImtqDummy.cpp b/dummies/ImtqDummy.cpp index 0c8f9076..8570a9be 100644 --- a/dummies/ImtqDummy.cpp +++ b/dummies/ImtqDummy.cpp @@ -5,14 +5,19 @@ ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie, power::Switch_t pwrSwitcher, bool enableHkSets) : DeviceHandlerBase(objectId, comif, comCookie), - setNoTorque(this), - setWithTorque(this), enableHkSets(enableHkSets), + statusSet(this), + dipoleSet(*this), + rawMtmNoTorque(this), + hkDatasetNoTorque(this), + rawMtmWithTorque(this), + hkDatasetWithTorque(this), + calMtmMeasurementSet(this), switcher(pwrSwitcher) {} ImtqDummy::~ImtqDummy() = default; -void ImtqDummy::doStartUp() { setMode(MODE_NORMAL); } +void ImtqDummy::doStartUp() { setMode(MODE_ON); } void ImtqDummy::doShutDown() { setMode(_MODE_POWER_DOWN); } @@ -79,17 +84,37 @@ ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataP localDataPoolMap.emplace(imtq::MCU_TEMPERATURE_WT, new PoolEntry({0})); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(setNoTorque.getSid(), enableHkSets, 30.0)); + subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 30.0)); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(setWithTorque.getSid(), enableHkSets, 30.0)); + subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 30.0)); + poolManager.subscribeForDiagPeriodicPacket( + subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0)); + poolManager.subscribeForDiagPeriodicPacket( + subdp::DiagnosticsHkPeriodicParams(rawMtmWithTorque.getSid(), false, 10.0)); + poolManager.subscribeForDiagPeriodicPacket( + subdp::DiagnosticsHkPeriodicParams(calMtmMeasurementSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(statusSet.getSid(), false, 10.0)); + poolManager.subscribeForDiagPeriodicPacket( + subdp::DiagnosticsHkPeriodicParams(dipoleSet.getSid(), false, 10.0)); return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager); } LocalPoolDataSetBase *ImtqDummy::getDataSetHandle(sid_t sid) { - if (sid == setNoTorque.getSid()) { - return &setNoTorque; - } else if (sid == setWithTorque.getSid()) { - return &setWithTorque; + if (sid == hkDatasetNoTorque.getSid()) { + return &hkDatasetNoTorque; + } else if (sid == dipoleSet.getSid()) { + return &dipoleSet; + } else if (sid == statusSet.getSid()) { + return &statusSet; + } else if (sid == hkDatasetWithTorque.getSid()) { + return &hkDatasetWithTorque; + } else if (sid == rawMtmWithTorque.getSid()) { + return &rawMtmWithTorque; + } else if (sid == calMtmMeasurementSet.getSid()) { + return &calMtmMeasurementSet; + } else if (sid == rawMtmNoTorque.getSid()) { + return &rawMtmNoTorque; } return nullptr; } diff --git a/dummies/ImtqDummy.h b/dummies/ImtqDummy.h index 990df6e0..3495589d 100644 --- a/dummies/ImtqDummy.h +++ b/dummies/ImtqDummy.h @@ -18,11 +18,19 @@ class ImtqDummy : public DeviceHandlerBase { ~ImtqDummy() override; protected: - ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override; - imtq::HkDatasetNoTorque setNoTorque; - imtq::HkDatasetWithTorque setWithTorque; + bool enableHkSets; + imtq::StatusDataset statusSet; + imtq::DipoleActuationSet dipoleSet; + imtq::RawMtmMeasurementNoTorque rawMtmNoTorque; + imtq::HkDatasetNoTorque hkDatasetNoTorque; + + imtq::RawMtmMeasurementWithTorque rawMtmWithTorque; + imtq::HkDatasetWithTorque hkDatasetWithTorque; + + imtq::CalibratedMtmMeasurementSet calMtmMeasurementSet; + PoolEntry statusMode = PoolEntry({0}); PoolEntry statusError = PoolEntry({0}); PoolEntry statusConfig = PoolEntry({0}); @@ -42,6 +50,8 @@ class ImtqDummy : public DeviceHandlerBase { power::Switch_t switcher = power::NO_SWITCH; + ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override; + void doStartUp() override; void doShutDown() override; ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override; From db3a4955c21d0ced957ae09a2bfe06a3264d9849 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 14:06:34 +0200 Subject: [PATCH 06/17] core ctrl provides more info on reboot --- bsp_q7s/core/CoreController.cpp | 49 ++++++++++++++++++++------------- bsp_q7s/core/CoreController.h | 2 ++ 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 0128d961..9c6e2305 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -171,6 +171,8 @@ ReturnValue_t CoreController::initialize() { sdStateMachine(); triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY); + announceCurrentImageInfo(); + announceVersionInfo(); EventManagerIF *eventManager = ObjectManager::instance()->get(objects::EVENT_MANAGER); if (eventManager == nullptr or eventQueue == nullptr) { @@ -220,24 +222,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_ using namespace core; switch (actionId) { case (ANNOUNCE_VERSION): { - uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) | - (common::OBSW_VERSION_REVISION << 8); - uint32_t p2 = 0; - if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) { - p1 |= 1; - auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1); - size_t posDash = shaAsStr.find("-"); - auto gitHash = shaAsStr.substr(posDash + 2, 4); - // Only copy first 4 letters of git hash - memcpy(&p2, gitHash.c_str(), 4); - } - - triggerEvent(VERSION_INFO, p1, p2); - if (mappedSysRomAddr != nullptr) { - uint32_t p1Firmware = *(reinterpret_cast(mappedSysRomAddr)); - uint32_t p2Firmware = *(reinterpret_cast(mappedSysRomAddr) + 1); - triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware); - } + announceVersionInfo(); return HasActionsIF::EXECUTION_FINISHED; } case (ANNOUNCE_BOOT_COUNTS): { @@ -245,7 +230,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_ return HasActionsIF::EXECUTION_FINISHED; } case (ANNOUNCE_CURRENT_IMAGE): { - triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY); + announceCurrentImageInfo(); return HasActionsIF::EXECUTION_FINISHED; } case (LIST_DIRECTORY_INTO_FILE): { @@ -2420,6 +2405,32 @@ void CoreController::dirListingDumpHandler() { } } +void CoreController::announceVersionInfo() { + using namespace core; + uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) | + (common::OBSW_VERSION_REVISION << 8); + uint32_t p2 = 0; + if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) { + p1 |= 1; + auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1); + size_t posDash = shaAsStr.find("-"); + auto gitHash = shaAsStr.substr(posDash + 2, 4); + // Only copy first 4 letters of git hash + memcpy(&p2, gitHash.c_str(), 4); + } + + triggerEvent(VERSION_INFO, p1, p2); + if (mappedSysRomAddr != nullptr) { + uint32_t p1Firmware = *(reinterpret_cast(mappedSysRomAddr)); + uint32_t p2Firmware = *(reinterpret_cast(mappedSysRomAddr) + 1); + triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware); + } +} + +void CoreController::announceCurrentImageInfo() { + triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY); +} + bool CoreController::isNumber(const std::string &s) { return !s.empty() && std::find_if(s.begin(), s.end(), [](unsigned char c) { return !std::isdigit(c); }) == s.end(); diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index 6703e398..79b486b4 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -289,6 +289,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe bool parseRebootFile(std::string path, RebootFile& file); void rewriteRebootFile(RebootFile file); void announceBootCounts(); + void announceVersionInfo(); + void announceCurrentImageInfo(); void readHkData(); void dirListingDumpHandler(); bool isNumber(const std::string& s); From afcc0cc21d735bbefcc7036fedef793f75640329 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 14:07:37 +0200 Subject: [PATCH 07/17] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c642b897..f4a92867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,11 +30,14 @@ will consitute of a breaking change warranting a new major release: - Removed PTME busy/ready signals. Those were not used anyway because register reads are used now. - APB bus access busy checking is not done anymore as this is performed by the bus itself now. +- Core controller will now announce version and image information event in addition to reboot + event in the `inititalize` function. ## Added - Added PL I2C reset pin. It is not used for now but could be used for FDIR procedures to restore the PL I2C. +- Core controller now announces firmware version as well when requesting a version info event # [v3.3.0] 2023-06-21 From 788fbb72f030326ab989ad9e45205deee124a3ef Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 14:25:11 +0200 Subject: [PATCH 08/17] that should do the job --- CHANGELOG.md | 1 + bsp_q7s/core/CoreController.cpp | 13 ++++++-- bsp_q7s/core/CoreController.h | 55 +++++++++++++++++++++++++++++++++ mission/sysDefs.h | 1 + 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4a92867..14402d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ will consitute of a breaking change warranting a new major release: - APB bus access busy checking is not done anymore as this is performed by the bus itself now. - Core controller will now announce version and image information event in addition to reboot event in the `inititalize` function. +- Added core controller action to read reboot mechansm information ## Added diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 9c6e2305..137abe2b 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -319,7 +319,6 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_ return HasActionsIF::INVALID_PARAMETERS; } std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE; - // Disable the reboot file mechanism parseRebootFile(path, rebootFile); if (data[0] == 0) { rebootFile.enabled = false; @@ -332,6 +331,16 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_ } return HasActionsIF::EXECUTION_FINISHED; } + case (READ_REBOOT_MECHANISM_INFO): { + std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE; + parseRebootFile(path, rebootFile); + RebootMechanismPacket packet(rebootFile); + ReturnValue_t result = actionHelper.reportData(commandedBy, actionId, &packet); + if (result != returnvalue::OK) { + return result; + } + return HasActionsIF::EXECUTION_FINISHED; + } case (RESET_REBOOT_COUNTERS): { if (size == 0) { resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY); @@ -1998,7 +2007,6 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) { void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) { std::string path = currMntPrefix + REBOOT_FILE; - // Disable the reboot file mechanism parseRebootFile(path, rebootFile); if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) { rebootFile.img00Cnt = 0; @@ -2428,6 +2436,7 @@ void CoreController::announceVersionInfo() { } void CoreController::announceCurrentImageInfo() { + using namespace core; triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY); } diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index 79b486b4..7ab80aa7 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -45,6 +45,61 @@ struct RebootFile { xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY; }; +class RebootMechanismPacket : public SerialLinkedListAdapter { + public: + RebootMechanismPacket(RebootFile& rf) { + enabled = rf.enabled; + maxCount = rf.maxCount; + img00Count = rf.img00Cnt; + img01Count = rf.img01Cnt; + img10Count = rf.img10Cnt; + img11Count = rf.img11Cnt; + img00Lock = rf.img00Lock; + img01Lock = rf.img01Lock; + img10Lock = rf.img10Lock; + img11Lock = rf.img11Lock; + lastChip = static_cast(rf.lastChip); + lastCopy = static_cast(rf.lastCopy); + nextChip = static_cast(rf.mechanismNextChip); + nextCopy = static_cast(rf.mechanismNextCopy); + setLinks(); + } + + private: + void setLinks() { + setStart(&enabled); + enabled.setNext(&maxCount); + maxCount.setNext(&img00Count); + img00Count.setNext(&img01Count); + img01Count.setNext(&img10Count); + img10Count.setNext(&img11Count); + img11Count.setNext(&img00Lock); + img00Lock.setNext(&img01Lock); + img01Lock.setNext(&img10Lock); + img10Lock.setNext(&img11Lock); + img11Lock.setNext(&lastChip); + lastChip.setNext(&lastCopy); + lastCopy.setNext(&nextChip); + nextChip.setNext(&nextCopy); + setLast(&nextCopy); + } + + SerializeElement enabled = false; + SerializeElement maxCount = 0; + SerializeElement img00Count = 0; + SerializeElement img01Count = 0; + SerializeElement img10Count = 0; + SerializeElement img11Count = 0; + SerializeElement img00Lock = false; + SerializeElement img01Lock = false; + SerializeElement img10Lock = false; + SerializeElement img11Lock = false; + SerializeElement lastChip = 0; + SerializeElement lastCopy = 0; + SerializeElement nextChip = 0; + SerializeElement nextCopy = 0; +}; + class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF { public: enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS }; diff --git a/mission/sysDefs.h b/mission/sysDefs.h index 41c7d43d..4adab118 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -53,6 +53,7 @@ static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5; static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6; static constexpr ActionId_t SWITCH_IMG_LOCK = 7; static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8; +static constexpr ActionId_t READ_REBOOT_MECHANISM_INFO = 9; static constexpr ActionId_t OBSW_UPDATE_FROM_SD_0 = 10; static constexpr ActionId_t OBSW_UPDATE_FROM_SD_1 = 11; From 880b8620ba5ae1fa0ce1b465284439924e05c4c8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 14:52:38 +0200 Subject: [PATCH 09/17] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 1bb8bea8..8239e610 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 1bb8bea8d92fef2c9ec58ea657b04b56635c16dd +Subproject commit 8239e610ccc069db0d314ff4f242bd47617bd548 From e8bd3f447da6b6b35f0bf2af9e453cbf56e0a366 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:19:38 +0200 Subject: [PATCH 10/17] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 8239e610..daceb6bc 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 8239e610ccc069db0d314ff4f242bd47617bd548 +Subproject commit daceb6bc1d85c3e63b4f2c777668e55223e6cabb From 1c27ba7261e45a548ba12e6344f28acb2c399e48 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:47:45 +0200 Subject: [PATCH 11/17] bump tmtc and CHANGELOG --- CHANGELOG.md | 4 ++-- tmtc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d98f83c9..cd227d98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,8 @@ will consitute of a breaking change warranting a new major release: # [v4.0.0] to be released -- `eive-tmtc` version v4.0.0 -- `q7s-package` version v3.0.0 +- `eive-tmtc` version v5.0.0 +- `q7s-package` version v3.1.1 ## Fixed diff --git a/tmtc b/tmtc index daceb6bc..5db9f383 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit daceb6bc1d85c3e63b4f2c777668e55223e6cabb +Subproject commit 5db9f383a6f7349bb0736442ecdf6ff2164b0632 From 9b2b087d08e72cc5e7559e7dc5d17b607a7aeb26 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:49:17 +0200 Subject: [PATCH 12/17] remove stray newline --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd227d98..3177949b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -180,7 +180,6 @@ Like v3.2.0 but without the custom FM changes related to VC0. # [v2.0.5] 2023-05-11 - - The dual lane assembly transition failed handler started new transitions towards the current mode instead of the target mode. This means that if the dual lane assembly never reached the initial submode (e.g. mode normal and submode dual side), it will transition back to the current mode, From fb9303a8de78a16b73d7e80a8f0e3629d6ffbf14 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:52:46 +0200 Subject: [PATCH 13/17] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3177949b..49b3e4bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ will consitute of a breaking change warranting a new major release: - APB bus access busy checking is not done anymore as this is performed by the bus itself now. - Core controller will now announce version and image information event in addition to reboot event in the `inititalize` function. +- Core controller will now try to request and announce the firmware version in addition to the + OBSW version as well. - Added core controller action to read reboot mechansm information ## Added From de4562dd2f3416a18cea7084ccc986ebcc58c7b2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:53:24 +0200 Subject: [PATCH 14/17] changelog tweak 2 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49b3e4bc..7d8d82dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,8 +40,8 @@ will consitute of a breaking change warranting a new major release: ## Added -- Added PL I2C reset pin. It is not used for now but could be used for FDIR procedures to restore - the PL I2C. +- Added PL I2C reset pin. It is not used/connected for now but could be used for FDIR procedures to + restore the PL I2C. - Core controller now announces firmware version as well when requesting a version info event # [v3.3.0] 2023-06-21 From b2b7900720c215cf042c89287aee5266ef8ca6f9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 16:54:49 +0200 Subject: [PATCH 15/17] reduce GNSS pin reset assertion time --- CHANGELOG.md | 1 + bsp_q7s/core/ObjectFactory.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d8d82dd..760456a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ will consitute of a breaking change warranting a new major release: - Core controller will now try to request and announce the firmware version in addition to the OBSW version as well. - Added core controller action to read reboot mechansm information +- GNSS reset pin will now only be asserted for 5 ms instead of 100 ms. ## Added diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 54084089..35d30c1a 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -506,7 +506,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* debugGps = true; #endif RESET_ARGS_GNSS.gpioComIF = gpioComIF; - RESET_ARGS_GNSS.waitPeriodMs = 100; + RESET_ARGS_GNSS.waitPeriodMs = 5; auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, enableHkSets, debugGps); gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS); From f67d72a8dd8655e668051f6cb266a39faddfd128 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 17:34:56 +0200 Subject: [PATCH 16/17] prep v4.0.0 final --- CHANGELOG.md | 2 +- release_checklist.md => release-checklist.md | 0 tmtc | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename release_checklist.md => release-checklist.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 760456a2..53ccf1d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ will consitute of a breaking change warranting a new major release: # [unreleased] -# [v4.0.0] to be released +# [v4.0.0] 2023-06-22 - `eive-tmtc` version v5.0.0 - `q7s-package` version v3.1.1 diff --git a/release_checklist.md b/release-checklist.md similarity index 100% rename from release_checklist.md rename to release-checklist.md diff --git a/tmtc b/tmtc index 5db9f383..c9f4a807 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5db9f383a6f7349bb0736442ecdf6ff2164b0632 +Subproject commit c9f4a8070d20bc659809d5b822ac5a17548f57a4 From f79acca1d6c709995b17a997d98c2bf2c3150d7f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 22 Jun 2023 18:34:16 +0200 Subject: [PATCH 17/17] afmt --- dummies/ImtqDummy.h | 1 - 1 file changed, 1 deletion(-) diff --git a/dummies/ImtqDummy.h b/dummies/ImtqDummy.h index 3495589d..8c76affc 100644 --- a/dummies/ImtqDummy.h +++ b/dummies/ImtqDummy.h @@ -18,7 +18,6 @@ class ImtqDummy : public DeviceHandlerBase { ~ImtqDummy() override; protected: - bool enableHkSets; imtq::StatusDataset statusSet;