Add psPowerOKDeAssert event to powerStateCheckForWarmReset
The case psPowerOKDeAssert can handle DC power lost in the
powerStateCheckForWarmReset state.
Signed-off-by: P.K. Lee <p.k.lee@quantatw.com>
Change-Id: I8498aa4ed7445c9fc622192e2c8ebd1ba19a8624
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index 90e8789..6f77d52 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -1592,6 +1592,12 @@
case Event::warmResetDetected:
setPowerState(PowerState::on);
break;
+ case Event::psPowerOKDeAssert:
+ warmResetCheckTimer.cancel();
+ setPowerState(PowerState::off);
+ // DC power is unexpectedly lost, beep
+ beep(beepPowerFail);
+ break;
default:
std::cerr << "No action taken.\n";
break;