power updates
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-03-14 13:56:19 +01:00
parent c9e16642c5
commit 6688499128
7 changed files with 39 additions and 33 deletions

View File

@ -19,7 +19,10 @@ DualLaneAssemblyBase::DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF*
void DualLaneAssemblyBase::performChildOperation() {
using namespace duallane;
if (pwrStateMachine.active()) {
pwrStateMachineWrapper();
ReturnValue_t result = pwrStateMachineWrapper();
if (result != returnvalue::OK) {
handleModeTransitionFailed(result);
}
}
// Only perform the regular child operation if the power state machine is not active.
// It does not make any sense to command device modes while the power switcher is busy
@ -112,6 +115,7 @@ void DualLaneAssemblyBase::handleModeReached() {
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 {
finishModeOp();