SoC Calculator #754

Merged
muellerr merged 74 commits from soc-calculator into main 2023-10-11 10:50:48 +02:00
4 changed files with 16 additions and 8 deletions
Showing only changes of commit 000077f327 - Show all commits

View File

@ -1511,10 +1511,12 @@ ReturnValue_t PlocMpsocHandler::checkModeCommand(Mode_t commandedMode, Submode_t
if (commandedMode != MODE_OFF) {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
if (enablePl.plUseAllowed.isValid() and not enablePl.plUseAllowed.value) {
return NON_OP_STATE_OF_CHARGE;
if (enablePl.plUseAllowed.isValid() and enablePl.plUseAllowed.value) {
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode,
msToReachTheMode);
}
}
return NON_OP_STATE_OF_CHARGE;
}
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode);
}

View File

@ -1999,10 +1999,12 @@ ReturnValue_t PlocSupervisorHandler::checkModeCommand(Mode_t commandedMode,
if (commandedMode != MODE_OFF) {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
if (enablePl.plUseAllowed.isValid() and not enablePl.plUseAllowed.value) {
return NON_OP_STATE_OF_CHARGE;
if (enablePl.plUseAllowed.isValid() and enablePl.plUseAllowed.value) {
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode,
msToReachTheMode);
}
}
return NON_OP_STATE_OF_CHARGE;
}
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode);
}

View File

@ -569,10 +569,12 @@ ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode
if (commandedMode != MODE_OFF) {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
if (enablePl.plUseAllowed.isValid() and not enablePl.plUseAllowed.value) {
return NON_OP_STATE_OF_CHARGE;
if (enablePl.plUseAllowed.isValid() and enablePl.plUseAllowed.value) {
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode,
msToReachTheMode);
}
}
return NON_OP_STATE_OF_CHARGE;
}
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode);
}

View File

@ -14,10 +14,12 @@ ReturnValue_t CamSwitcher::checkModeCommand(Mode_t commandedMode, Submode_t comm
if (commandedMode != MODE_OFF) {
PoolReadGuard pg(&enablePl);
if (pg.getReadResult() == returnvalue::OK) {
if (enablePl.plUseAllowed.isValid() and not enablePl.plUseAllowed.value) {
return TRANS_NOT_ALLOWED;
if (enablePl.plUseAllowed.isValid() and enablePl.plUseAllowed.value) {
return PowerSwitcherComponent::checkModeCommand(commandedMode, commandedSubmode,
msToReachTheMode);
}
}
return TRANS_NOT_ALLOWED;
}
return PowerSwitcherComponent::checkModeCommand(commandedMode, commandedSubmode,
msToReachTheMode);