Explicitly set power output

This commit is contained in:
C0d3v 2026-01-15 20:35:52 +01:00
parent 0f867c2248
commit 120c89e3a4

View File

@ -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;
}
/* ========================================================= */