From b8b6a14e3bf741c085637066795f8ba8d993306a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 11:27:16 +0200 Subject: [PATCH 1/7] some bugfixes --- fsfw | 2 +- mission/controller/AcsController.cpp | 8 +++++--- mission/controller/AcsController.h | 2 +- .../controller/controllerdefinitions/AcsCtrlDefinitions.h | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/fsfw b/fsfw index f4c4f994..d9759581 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit f4c4f9946c7fb9fd050178baa4865da654366b70 +Subproject commit d975958120bd151dabdc450a104e9cc8069ff509 diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index c7309097..46db49ce 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -29,9 +29,11 @@ void AcsController::performControlOperation() { break; } - if (mgmData.read() == RETURN_OK) { - copyMgmData(); - mgmData.commit(); + { + PoolReadGuard pg(&mgmData); + if (pg.getReadResult() == RETURN_OK) { + copyMgmData(); + } } } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index 35503c48..8dbe38aa 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -43,7 +43,7 @@ class AcsController : public ExtendedControllerBase { PoolEntry mgm1PoolVec = PoolEntry(3); PoolEntry mgm2PoolVec = PoolEntry(3); PoolEntry mgm3PoolVec = PoolEntry(3); - PoolEntry imtqMgmPoolVec = PoolEntry(3); + PoolEntry imtqMgmPoolVec = PoolEntry(3); PoolEntry imtqCalActStatus = PoolEntry(); void copyMgmData(); diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index 9062ef6b..f2913943 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -21,7 +21,7 @@ enum PoolIds : lp_id_t { }; -static constexpr uint8_t MGM_SET_ENTRIES = 5; +static constexpr uint8_t MGM_SET_ENTRIES = 10; /** * @brief This dataset can be used to store the collected temperatures of all temperature sensors From ce08695137aabe64a37e4c5c22c16ddcab24fef0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 11:44:59 +0200 Subject: [PATCH 2/7] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 3fa70080..2165f376 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 3fa700804e0592db4e9a5667de2a81323cac5dc7 +Subproject commit 2165f376fbb8624a44e87b4395d544de663a2d04 From 676b94b139286a773b5f36ede9f24511051816d3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 11:56:17 +0200 Subject: [PATCH 3/7] map dataset to sid --- common/config/commonObjects.h | 2 +- mission/controller/AcsController.cpp | 7 ++++++- tmtc | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index 4a4594f4..e0efbce7 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -18,7 +18,7 @@ enum commonObjects : uint32_t { /* 0x43 ('C') for Controllers */ THERMAL_CONTROLLER = 0x43400001, - ACS_CONTROLLER = 0x43100002, + ACS_CONTROLLER = 0x43000002, CORE_CONTROLLER = 0x43000003, /* 0x44 ('D') for device handlers */ diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 46db49ce..e323903f 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -48,7 +48,12 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD return HasReturnvaluesIF::RETURN_OK; } -LocalPoolDataSetBase *AcsController::getDataSetHandle(sid_t sid) { return nullptr; } +LocalPoolDataSetBase *AcsController::getDataSetHandle(sid_t sid) { + if (sid == mgmData.getSid()) { + return &mgmData; + } + return nullptr; +} ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode, uint32_t *msToReachTheMode) { diff --git a/tmtc b/tmtc index 2165f376..9de4cabc 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 2165f376fbb8624a44e87b4395d544de663a2d04 +Subproject commit 9de4cabcd9db8ddb9e88203b4ad9c5eaf612a112 From 80347a0e233e77a8f5016dc03b5b4210adf752ea Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 12:57:43 +0200 Subject: [PATCH 4/7] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 9de4cabc..19b35f7e 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 9de4cabcd9db8ddb9e88203b4ad9c5eaf612a112 +Subproject commit 19b35f7e185a2a1a452364e2b9ae318dffd2928e From 30e7636bc907f315e087bd094fce0375b425268e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 16:37:54 +0200 Subject: [PATCH 5/7] add periodic HK subscription --- 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 e323903f..4aea53a0 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -45,6 +45,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_RM3100_UT, &mgm3PoolVec); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_NT, &imtqMgmPoolVec); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_ACT_STATUS, &imtqCalActStatus); + poolManager.subscribeForPeriodicPacket(mgmData.getSid(), false, 5.0, false); return HasReturnvaluesIF::RETURN_OK; } diff --git a/tmtc b/tmtc index 19b35f7e..f85694de 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 19b35f7e185a2a1a452364e2b9ae318dffd2928e +Subproject commit f85694de025f6d60bd46c9b94247f73c036daedb From ffed82575c2f21c3bae0f08249ac0325e6e8fa30 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 16:43:30 +0200 Subject: [PATCH 6/7] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index f85694de..ca9f85de 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit f85694de025f6d60bd46c9b94247f73c036daedb +Subproject commit ca9f85de1b51e29e3c0cccd527d736083e374f7f From 3c03471197ac8eeccf311345a885c9b0642dad03 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 Aug 2022 16:45:14 +0200 Subject: [PATCH 7/7] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b88823b5..5ffdcbc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ list yields a list of all related PRs for each release. # [unreleased] +# [v1.13.0] + +- Added first version of ACS Controller with gathers MGM data in a set + # [v1.12.1] 05.07.2022 - Disable periodic TCS controller HK generation by default