From 6cbd873a97acaf4d37db4d0739a209ea4218d4d7 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 6 Feb 2024 15:01:20 +0100 Subject: [PATCH 1/4] fix --- mission/controller/AcsController.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 8d35a8fd..c112cbde 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -357,7 +357,8 @@ void AcsController::performPointingCtrl() { ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL) { ptgCtrlLostCounter++; if (ptgCtrlLostCounter > acsParameters.onBoardParams.ptgCtrlLostTimer) { - triggerEvent(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION); + EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::PTG_CTRL_NO_ATTITUDE_INFORMATION, 0, + 0); ptgCtrlLostCounter = 0; } guidance.resetValues(); -- 2.43.0 From b7f62ac3e2170190441d046b41bb3278627574b8 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 6 Feb 2024 15:02:52 +0100 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b80a3d..d1dafe90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- The `PTG_CTRL_NO_ATTITUDE_INFORMATION` will now actually trigger a fallback into + safe mode. + # [v7.6.1] 2024-02-05 ## Changed -- 2.43.0 From efc0be104ca1fcdf881415f8f20da72564a54099 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 13 Feb 2024 16:45:59 +0100 Subject: [PATCH 3/4] acs ctrl triggers event now --- mission/controller/AcsController.cpp | 3 +-- mission/system/acs/StrFdir.cpp | 14 +++++++++++++- mission/system/acs/StrFdir.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index c112cbde..8d35a8fd 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -357,8 +357,7 @@ void AcsController::performPointingCtrl() { ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL) { ptgCtrlLostCounter++; if (ptgCtrlLostCounter > acsParameters.onBoardParams.ptgCtrlLostTimer) { - EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::PTG_CTRL_NO_ATTITUDE_INFORMATION, 0, - 0); + triggerEvent(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION); ptgCtrlLostCounter = 0; } guidance.resetValues(); diff --git a/mission/system/acs/StrFdir.cpp b/mission/system/acs/StrFdir.cpp index 83bd27fa..91e83263 100644 --- a/mission/system/acs/StrFdir.cpp +++ b/mission/system/acs/StrFdir.cpp @@ -1,6 +1,8 @@ #include "StrFdir.h" -#include "mission/acs/defs.h" +#include +#include +#include StrFdir::StrFdir(object_id_t strObject) : DeviceHandlerFailureIsolation(strObject, objects::NO_OBJECT) {} @@ -12,3 +14,13 @@ ReturnValue_t StrFdir::eventReceived(EventMessage* event) { } return DeviceHandlerFailureIsolation::eventReceived(event); } + +ReturnValue_t StrFdir::initialize() { + ReturnValue_t result = DeviceHandlerFailureIsolation::initialize(); + if (result != returnvalue::OK) { + return result; + } + EventManagerIF* manager = ObjectManager::instance()->get(objects::EVENT_MANAGER); + return manager->subscribeToEvent(eventQueue->getId(), + event::getEventId(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION)); +} diff --git a/mission/system/acs/StrFdir.h b/mission/system/acs/StrFdir.h index 20476e1a..a40a3ccc 100644 --- a/mission/system/acs/StrFdir.h +++ b/mission/system/acs/StrFdir.h @@ -6,6 +6,7 @@ class StrFdir : public DeviceHandlerFailureIsolation { public: StrFdir(object_id_t strObject); + ReturnValue_t initialize() override; ReturnValue_t eventReceived(EventMessage* event) override; }; -- 2.43.0 From 79a659bc391eb1e50b868dc832e39c0ea018ce13 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 13 Feb 2024 16:47:03 +0100 Subject: [PATCH 4/4] changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f75557f4..baccb4cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,8 +23,8 @@ will consitute of a breaking change warranting a new major release: - PLOC SUPV latchup report could not be handled previously. - Bugfix in PLOC SUPV latchup report parsing. - Bugfix in PLOC MPSoC HK set: Set and variables were not set valid. -- The `PTG_CTRL_NO_ATTITUDE_INFORMATION` will now actually trigger a fallback into - safe mode. +- The `PTG_CTRL_NO_ATTITUDE_INFORMATION` will now actually trigger a fallback into safe mode + and is triggered by the `AcsController` now. # [v7.6.1] 2024-02-05 -- 2.43.0