From 706c5be7f71fd24abee12e1223c29e6c4ffec3e9 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 9 Oct 2023 14:03:57 +0200 Subject: [PATCH] stop the spam --- mission/controller/PowerController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mission/controller/PowerController.cpp b/mission/controller/PowerController.cpp index bd760012..edda2911 100644 --- a/mission/controller/PowerController.cpp +++ b/mission/controller/PowerController.cpp @@ -246,13 +246,13 @@ void PowerController::watchStateOfCharge() { if (not pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitLow) { triggerEvent(power::POWER_LEVEL_LOW); pwrLvlLowFlag = true; - } else { + } else if (pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value > payloadOpLimitLow) { pwrLvlLowFlag = false; } if (not pwrLvlCriticalFlag and pwrCtrlCoreHk.coulombCounterCharge.value < higherModesLimit) { triggerEvent(power::POWER_LEVEL_CRITICAL); pwrLvlCriticalFlag = true; - } else { + } else if (pwrLvlCriticalFlag and pwrCtrlCoreHk.coulombCounterCharge.value > higherModesLimit) { pwrLvlCriticalFlag = false; } } else {