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