From 61b3ef790a1955af3cc2c1e9dc1f507794679aaa Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 24 Jul 2023 10:14:38 +0200 Subject: [PATCH] lets pretend this makes it all better --- mission/controller/acs/control/SafeCtrl.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mission/controller/acs/control/SafeCtrl.cpp b/mission/controller/acs/control/SafeCtrl.cpp index d8e97728..8ad8b578 100644 --- a/mission/controller/acs/control/SafeCtrl.cpp +++ b/mission/controller/acs/control/SafeCtrl.cpp @@ -26,10 +26,14 @@ acs::SafeModeStrategy SafeCtrl::safeCtrlStrategy( return acs::SafeModeStrategy::SAFECTRL_NO_SENSORS_FOR_CONTROL; } } else if (not sunDirValid) { - if (gyrEnabled and dampingEnabled and satRotRateValid) { - return acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING_GYR; - } else if (not gyrEnabled and dampingEnabled and satRotRateValid and fusedRateTotalValid) { - return acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM; + if (dampingEnabled) { + if (gyrEnabled and satRotRateValid) { + return acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING_GYR; + } else if (not gyrEnabled and satRotRateValid and fusedRateTotalValid) { + return acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM; + } else { + return acs::SafeModeStrategy::SAFECTRL_NO_SENSORS_FOR_CONTROL; + } } else if (not dampingEnabled and satRotRateValid) { return acs::SafeModeStrategy::SAFECTRL_ECLIPSE_IDELING; } else {