SoC Calculator #754
@ -98,6 +98,11 @@ void PowerController::performControlOperation() {
|
|||||||
calculateStateOfCharge();
|
calculateStateOfCharge();
|
||||||
if (mode == MODE_NORMAL) {
|
if (mode == MODE_NORMAL) {
|
||||||
watchStateOfCharge();
|
watchStateOfCharge();
|
||||||
|
} else {
|
||||||
|
PoolReadGuard pg(&enablePl);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
enablePl.setValidity(false, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -229,13 +234,13 @@ void PowerController::watchStateOfCharge() {
|
|||||||
PoolReadGuard pg(&enablePl);
|
PoolReadGuard pg(&enablePl);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
enablePl.plUseAllowed.value = false;
|
enablePl.plUseAllowed.value = false;
|
||||||
enablePl.plUseAllowed.setValid(true);
|
enablePl.setValidity(true, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PoolReadGuard pg(&enablePl);
|
PoolReadGuard pg(&enablePl);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
enablePl.plUseAllowed.value = true;
|
enablePl.plUseAllowed.value = true;
|
||||||
enablePl.plUseAllowed.setValid(true);
|
enablePl.setValidity(true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (not pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitLow) {
|
if (not pwrLvlLowFlag and pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitLow) {
|
||||||
@ -254,7 +259,7 @@ void PowerController::watchStateOfCharge() {
|
|||||||
PoolReadGuard pg(&enablePl);
|
PoolReadGuard pg(&enablePl);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
enablePl.plUseAllowed.value = false;
|
enablePl.plUseAllowed.value = false;
|
||||||
enablePl.plUseAllowed.setValid(true);
|
enablePl.setValidity(true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user