From 3a56297a83b5d966d16f04daa79c09e1d43ff21d Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 14 Mar 2023 13:15:48 +0100 Subject: [PATCH 1/3] mekfViolationTimer as parameter --- mission/controller/AcsController.cpp | 2 +- mission/controller/acs/AcsParameters.cpp | 3 +++ mission/controller/acs/AcsParameters.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index b4e7c5d3..a2d01719 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -271,7 +271,7 @@ void AcsController::performPointingCtrl() { triggerEvent(acs::MEKF_INVALID_INFO); mekfInvalidFlag = true; } - if (mekfInvalidCounter == 5) { + if (mekfInvalidCounter > acsParameters.onBoardParams.mekfViolationTimer) { // Trigger this so STR FDIR can set the device faulty. EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::MEKF_INVALID_MODE_VIOLATION, 0, 0); } diff --git a/mission/controller/acs/AcsParameters.cpp b/mission/controller/acs/AcsParameters.cpp index 4abe0d7a..060e0aac 100644 --- a/mission/controller/acs/AcsParameters.cpp +++ b/mission/controller/acs/AcsParameters.cpp @@ -23,6 +23,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, case 0x0: parameterWrapper->set(onBoardParams.sampleTime); break; + case 0x1: + parameterWrapper->set(onBoardParams.mekfViolationTimer); + break; default: return INVALID_IDENTIFIER_ID; } diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index 822cfabc..fca8ed8e 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -18,6 +18,7 @@ class AcsParameters : public HasParametersIF { struct OnBoardParams { double sampleTime = 0.4; // [s] + uint16_t mekfViolationTimer = 750; } onBoardParams; struct InertiaEIVE { -- 2.43.0 From 4664a9f4e73af57243cb9f6aa1067bf63eea3c6d Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 14 Mar 2023 13:19:48 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be95f310..f93786b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ will consitute of a breaking change warranting a new major release: ## Added - Added `EXECUTE_SHELL_CMD` action command for `CoreController` to execute arbitrary Linux commands. +- Added parameter for timeout until `MEKF_INVALID_MODE_VIOLATION` event is triggered. ## Fixed -- 2.43.0 From 90d00b44eea63995c26b9d0c4065d34c176730e7 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 14 Mar 2023 14:12:55 +0100 Subject: [PATCH 3/3] nothing to see here --- mission/controller/AcsController.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index c0376127..62bbf5a3 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -61,7 +61,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes uint8_t detumbleCounter = 0; uint8_t multipleRwUnavailableCounter = 0; bool mekfInvalidFlag = false; - uint8_t mekfInvalidCounter = 0; + uint16_t mekfInvalidCounter = 0; int32_t cmdSpeedRws[4] = {0, 0, 0, 0}; int16_t cmdDipolMtqs[3] = {0, 0, 0}; -- 2.43.0