SoC Calculator #754

Merged
muellerr merged 74 commits from soc-calculator into main 2023-10-11 10:50:48 +02:00
Showing only changes of commit 706c5be7f7 - Show all commits

View File

@ -246,13 +246,13 @@ void PowerController::watchStateOfCharge() {
if (not pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitLow) { if (not pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitLow) {
triggerEvent(power::POWER_LEVEL_LOW); triggerEvent(power::POWER_LEVEL_LOW);
pwrLvlLowFlag = true; pwrLvlLowFlag = true;
} else { } else if (pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value > payloadOpLimitLow) {
pwrLvlLowFlag = false; pwrLvlLowFlag = false;
} }
if (not pwrLvlCriticalFlag and pwrCtrlCoreHk.coulombCounterCharge.value < higherModesLimit) { if (not pwrLvlCriticalFlag and pwrCtrlCoreHk.coulombCounterCharge.value < higherModesLimit) {
triggerEvent(power::POWER_LEVEL_CRITICAL); triggerEvent(power::POWER_LEVEL_CRITICAL);
pwrLvlCriticalFlag = true; pwrLvlCriticalFlag = true;
} else { } else if (pwrLvlCriticalFlag and pwrCtrlCoreHk.coulombCounterCharge.value > higherModesLimit) {
pwrLvlCriticalFlag = false; pwrLvlCriticalFlag = false;
} }
} else { } else {