set plFlag to invalid if PWR ctrl is in on
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Marius Eggert 2023-09-29 10:30:26 +02:00
parent 9f8e7b6673
commit 9472faf899

View File

@ -98,6 +98,11 @@ void PowerController::performControlOperation() {
calculateStateOfCharge();
if (mode == MODE_NORMAL) {
watchStateOfCharge();
} else {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
enablePl.setValidity(false, true);
}
}
}
break;
@ -229,13 +234,13 @@ void PowerController::watchStateOfCharge() {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
enablePl.plUseAllowed.value = false;
enablePl.plUseAllowed.setValid(true);
enablePl.setValidity(true, true);
}
} else {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
enablePl.plUseAllowed.value = true;
enablePl.plUseAllowed.setValid(true);
enablePl.setValidity(true, true);
}
}
if (not pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitLow) {
@ -254,7 +259,7 @@ void PowerController::watchStateOfCharge() {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
enablePl.plUseAllowed.value = false;
enablePl.plUseAllowed.setValid(true);
enablePl.setValidity(true, true);
}
}
}