this is better
This commit is contained in:
@ -100,15 +100,16 @@ void PowerController::performControlOperation() {
|
||||
return;
|
||||
}
|
||||
case InternalState::READY: {
|
||||
if (mode != MODE_NORMAL) {
|
||||
PoolReadGuard pg(&enablePl);
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
enablePl.setValidity(false, true);
|
||||
}
|
||||
}
|
||||
if (mode != MODE_OFF) {
|
||||
calculateStateOfCharge();
|
||||
if (mode == MODE_NORMAL) {
|
||||
watchStateOfCharge();
|
||||
} else {
|
||||
PoolReadGuard pg(&enablePl);
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
enablePl.setValidity(false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -370,10 +371,3 @@ ReturnValue_t PowerController::calculateCoulombCounterChargeUpperThreshold() {
|
||||
lookUpTableOcv[0][lookUpTableIdx + 1]);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void PowerController::startTransition(Mode_t mode, Submode_t submode) {
|
||||
if (mode == MODE_OFF) {
|
||||
enablePl.setValidity(false, true);
|
||||
}
|
||||
ControllerBase::startTransition(mode, submode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user