Explicitly set power output
This commit is contained in:
parent
0f867c2248
commit
120c89e3a4
@ -111,19 +111,20 @@ bool checkPowerState()
|
||||
rawState != powerStableState)
|
||||
{
|
||||
powerStableState = rawState;
|
||||
digitalWrite(PIN_POWER_SWITCH_OUTPUT, powerStableState == HIGH);
|
||||
if (powerStableState == HIGH)
|
||||
if (powerStableState)
|
||||
{
|
||||
setDrawerLight(selectedIndex);
|
||||
digitalWrite(PIN_POWER_SWITCH_OUTPUT, HIGH);
|
||||
enableEncoder();
|
||||
}
|
||||
else
|
||||
{
|
||||
turnLightsOff();
|
||||
digitalWrite(PIN_POWER_SWITCH_OUTPUT, LOW);
|
||||
disableEncoder();
|
||||
}
|
||||
}
|
||||
return (powerStableState == HIGH);
|
||||
return powerStableState;
|
||||
}
|
||||
|
||||
/* ========================================================= */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user