corrected logic
This commit is contained in:
parent
33d3e7686c
commit
000077f327
@ -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) {
|
||||
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);
|
||||
}
|
||||
|
@ -1999,11 +1999,13 @@ 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) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -569,11 +569,13 @@ 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) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,13 @@ 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) {
|
||||
if (enablePl.plUseAllowed.isValid() and enablePl.plUseAllowed.value) {
|
||||
return PowerSwitcherComponent::checkModeCommand(commandedMode, commandedSubmode,
|
||||
msToReachTheMode);
|
||||
}
|
||||
}
|
||||
return TRANS_NOT_ALLOWED;
|
||||
}
|
||||
}
|
||||
}
|
||||
return PowerSwitcherComponent::checkModeCommand(commandedMode, commandedSubmode,
|
||||
msToReachTheMode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user