This commit is contained in:
parent
5890e639fe
commit
74bb27e61f
@ -82,9 +82,13 @@ ReturnValue_t DualLaneAssemblyBase::pwrStateMachineWrapper() {
|
||||
// Will be called for transitions to MODE_OFF, where everything is done after power switching
|
||||
finishModeOp();
|
||||
} else if (opCode == OpCodes::TO_NOT_OFF_DONE) {
|
||||
if (dualToSingleSideTransition) {
|
||||
finishModeOp();
|
||||
} else {
|
||||
// Will be called for transitions from MODE_OFF to anything else, where the mode still has
|
||||
// to be commanded after power switching
|
||||
AssemblyBase::startTransition(targetMode, targetSubmode);
|
||||
}
|
||||
} else if (opCode == OpCodes::TIMEOUT_OCCURED) {
|
||||
if (powerRetryCounter == 0) {
|
||||
powerRetryCounter++;
|
||||
@ -118,13 +122,20 @@ ReturnValue_t DualLaneAssemblyBase::isModeCombinationValid(Mode_t mode, Submode_
|
||||
|
||||
void DualLaneAssemblyBase::handleModeReached() {
|
||||
using namespace duallane;
|
||||
if (targetMode == MODE_OFF or dualToSingleSideTransition) {
|
||||
if (targetMode == MODE_OFF) {
|
||||
pwrStateMachine.start(targetMode, targetSubmode);
|
||||
// Now we can switch off the power. After that, the AssemblyBase::handleModeReached function
|
||||
// will be called
|
||||
// Ignore failures for now.
|
||||
pwrStateMachineWrapper();
|
||||
} else {
|
||||
// For dual to single side transition, devices should be logically off, but the switch
|
||||
// handling still needs to be done.
|
||||
if (dualToSingleSideTransition) {
|
||||
pwrStateMachine.start(targetMode, targetSubmode);
|
||||
pwrStateMachineWrapper();
|
||||
return;
|
||||
}
|
||||
finishModeOp();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user