From fb2995575b592cc785a5abd2557605c57b93c0aa Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Aug 2023 13:26:45 +0200 Subject: [PATCH 1/6] prep next version --- CHANGELOG.md | 4 +++- CMakeLists.txt | 2 +- mission/system/EiveSystem.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a41a7d..c04b24c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,9 @@ will consitute of a breaking change warranting a new major release: # [unreleased] -- `eive-tmtc`: +# [v6.4.0] 2023-08-15 + +- `eive-tmtc`: v5.4.0 ## Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index 6610b0a6..058c99fc 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 3) +set(OBSW_VERSION_MINOR 4) set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) diff --git a/mission/system/EiveSystem.cpp b/mission/system/EiveSystem.cpp index 84b4edf7..6519806e 100644 --- a/mission/system/EiveSystem.cpp +++ b/mission/system/EiveSystem.cpp @@ -134,7 +134,7 @@ void EiveSystem::handleEventMessages() { if (event.getParameter1() == pdec::FRAME_DIRTY_RETVAL) { frameDirtyErrorCounter++; // Check whether threshold was reached after 10 seconds. - if(frameDirtyErrorCounter == 1) { + if (frameDirtyErrorCounter == 1) { frameDirtyCheckCd.resetTimer(); } } From af5f51928b2fbb44ccf12cfb8fb70e00843713f7 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Aug 2023 13:49:06 +0200 Subject: [PATCH 2/6] PLOC SUPV periodic HK --- CHANGELOG.md | 1 + linux/payload/PlocSupervisorHandler.cpp | 9 +++++++++ mission/system/EiveSystem.cpp | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a41a7d..8a5aa945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ will consitute of a breaking change warranting a new major release: ## Added +- The PLOC SUPV HK set is requested and downlinked periodically if the SUPV is on now. - SGP4 Propagator is now used for propagating the position of EIVE. It will only work once a TLE has been uploaded with the newly added action command for the ACS Controller. In return the actual GPS data will be ignored once SPG4 is running. However, by setting the diff --git a/linux/payload/PlocSupervisorHandler.cpp b/linux/payload/PlocSupervisorHandler.cpp index 682b8020..5bb68d9d 100644 --- a/linux/payload/PlocSupervisorHandler.cpp +++ b/linux/payload/PlocSupervisorHandler.cpp @@ -155,12 +155,15 @@ void PlocSupervisorHandler::doStartUp() { startupState = StartupState::ON; } if (startupState == StartupState::ON) { + hkset.setReportingEnabled(true); setMode(_MODE_TO_ON); } } void PlocSupervisorHandler::doShutDown() { setMode(_MODE_POWER_DOWN); + hkset.setReportingEnabled(false); + hkset.setValidity(false, true); shutdownCmdSent = false; packetInBuffer = false; nextReplyId = supv::NONE; @@ -170,6 +173,10 @@ void PlocSupervisorHandler::doShutDown() { } ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { + if (not commandIsExecuting(GET_HK_REPORT)) { + *id = GET_HK_REPORT; + return OK; + } return NOTHING_TO_SEND; } @@ -790,6 +797,8 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool localDataPoolMap.emplace(supv::ADC_ENG_14, new PoolEntry({0})); localDataPoolMap.emplace(supv::ADC_ENG_15, new PoolEntry({0})); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(hkset.getSid(), false, 10.0)); return returnvalue::OK; } diff --git a/mission/system/EiveSystem.cpp b/mission/system/EiveSystem.cpp index 84b4edf7..6519806e 100644 --- a/mission/system/EiveSystem.cpp +++ b/mission/system/EiveSystem.cpp @@ -134,7 +134,7 @@ void EiveSystem::handleEventMessages() { if (event.getParameter1() == pdec::FRAME_DIRTY_RETVAL) { frameDirtyErrorCounter++; // Check whether threshold was reached after 10 seconds. - if(frameDirtyErrorCounter == 1) { + if (frameDirtyErrorCounter == 1) { frameDirtyCheckCd.resetTimer(); } } From 2d18ce4ff16a8a1415434921eb88c1c5de213a65 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Aug 2023 13:59:59 +0200 Subject: [PATCH 3/6] adapt changelog --- CHANGELOG.md | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9d51ae4..1c2e5fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release: # [v6.4.0] 2023-08-15 -- `eive-tmtc`: v5.4.0 +- `eive-tmtc`: v5.4.2 ## Fixed diff --git a/tmtc b/tmtc index f76cd945..bc1a1774 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit f76cd9453593375974bc67fa7ce3906c6eb4443a +Subproject commit bc1a1774a6ace986ec6a3acecb150b7c1d813fce From 963ca0c9393bd2a6363454cdf46994308e7b0824 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Aug 2023 14:34:10 +0200 Subject: [PATCH 4/6] PLOC SUPV --- linux/payload/PlocSupervisorHandler.cpp | 4 ++-- linux/payload/plocSupvDefs.h | 1 - tmtc | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/linux/payload/PlocSupervisorHandler.cpp b/linux/payload/PlocSupervisorHandler.cpp index 5bb68d9d..6bd57a70 100644 --- a/linux/payload/PlocSupervisorHandler.cpp +++ b/linux/payload/PlocSupervisorHandler.cpp @@ -175,7 +175,7 @@ void PlocSupervisorHandler::doShutDown() { ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { if (not commandIsExecuting(GET_HK_REPORT)) { *id = GET_HK_REPORT; - return OK; + return buildCommandFromCommand(*id, nullptr, 0); } return NOTHING_TO_SEND; } @@ -927,7 +927,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data) ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) { ReturnValue_t result = returnvalue::OK; - result = verifyPacket(data, supv::SIZE_HK_REPORT); + result = verifyPacket(data, tmReader.getFullPacketLen()); if (result == result::CRC_FAILURE) { sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc" << std::endl; diff --git a/linux/payload/plocSupvDefs.h b/linux/payload/plocSupvDefs.h index d3fda3da..907bfe0c 100644 --- a/linux/payload/plocSupvDefs.h +++ b/linux/payload/plocSupvDefs.h @@ -139,7 +139,6 @@ enum ReplyId : DeviceCommandId_t { // Size of complete space packet (6 byte header + size of data + 2 byte CRC) static const uint16_t SIZE_ACK_REPORT = 14; static const uint16_t SIZE_EXE_REPORT = 14; -static const uint16_t SIZE_HK_REPORT = 52; static const uint16_t SIZE_BOOT_STATUS_REPORT = 24; static const uint16_t SIZE_LATCHUP_STATUS_REPORT = 31; static const uint16_t SIZE_LOGGING_REPORT = 73; diff --git a/tmtc b/tmtc index bc1a1774..2f8bed45 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit bc1a1774a6ace986ec6a3acecb150b7c1d813fce +Subproject commit 2f8bed4581e05628a3945756cef57ea1602514cb From e64e9daed111dca6f82b4cf6763baeea647b97d0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Aug 2023 14:42:12 +0200 Subject: [PATCH 5/6] bump eive-tmtc --- CHANGELOG.md | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c2e5fdc..233f1562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release: # [v6.4.0] 2023-08-15 -- `eive-tmtc`: v5.4.2 +- `eive-tmtc`: v5.4.3 ## Fixed diff --git a/tmtc b/tmtc index 2f8bed45..b50c75c1 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 2f8bed4581e05628a3945756cef57ea1602514cb +Subproject commit b50c75c13cdbbc3d34d2f072d2bf1cb2fbe734b5 From d1a446d445422ca3f973f7e1cb40d5dba036dbe8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Aug 2023 14:43:23 +0200 Subject: [PATCH 6/6] hopefully dont need this const --- linux/payload/PlocSupervisorHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/payload/PlocSupervisorHandler.cpp b/linux/payload/PlocSupervisorHandler.cpp index 6bd57a70..940785af 100644 --- a/linux/payload/PlocSupervisorHandler.cpp +++ b/linux/payload/PlocSupervisorHandler.cpp @@ -437,7 +437,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() { insertInReplyMap(MEMORY_CHECK, 5, nullptr, 0, false); // TM replies - insertInReplyMap(HK_REPORT, 3, &hkset, SIZE_HK_REPORT); + insertInReplyMap(HK_REPORT, 3, &hkset); insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_STATUS_REPORT); insertInReplyMap(LATCHUP_REPORT, 3, &latchupStatusReport, SIZE_LATCHUP_STATUS_REPORT); insertInReplyMap(LOGGING_REPORT, 3, &loggingReport, SIZE_LOGGING_REPORT);