this is better
This commit is contained in:
parent
04c081f4aa
commit
f0cafedda7
@ -100,15 +100,16 @@ void PowerController::performControlOperation() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case InternalState::READY: {
|
case InternalState::READY: {
|
||||||
|
if (mode != MODE_NORMAL) {
|
||||||
|
PoolReadGuard pg(&enablePl);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
enablePl.setValidity(false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mode != MODE_OFF) {
|
if (mode != MODE_OFF) {
|
||||||
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;
|
||||||
@ -370,10 +371,3 @@ ReturnValue_t PowerController::calculateCoulombCounterChargeUpperThreshold() {
|
|||||||
lookUpTableOcv[0][lookUpTableIdx + 1]);
|
lookUpTableOcv[0][lookUpTableIdx + 1]);
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PowerController::startTransition(Mode_t mode, Submode_t submode) {
|
|
||||||
if (mode == MODE_OFF) {
|
|
||||||
enablePl.setValidity(false, true);
|
|
||||||
}
|
|
||||||
ControllerBase::startTransition(mode, submode);
|
|
||||||
}
|
|
||||||
|
@ -22,7 +22,6 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM
|
|||||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId,
|
ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId,
|
||||||
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
|
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
|
||||||
uint16_t startAtIndex) override;
|
uint16_t startAtIndex) override;
|
||||||
void startTransition(Mode_t mode, Submode_t submode) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool enableHkSets = false;
|
bool enableHkSets = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user