Fixed prressing button while Off causing you to never be able to Off again

This commit is contained in:
nedko 2023-03-03 14:53:25 +02:00
parent 9312665dfa
commit c8ecf6744d

View File

@ -444,6 +444,12 @@ void state_switch(uint8_t is_onoff)
if (is_onoff == 0)
{
// If we're off don't change anything
if (func_idx == sizeof(func_list) / sizeof(func_list[0]) - 1)
{
return;
}
switch (colour_state)
{
case STATE_SUN_MOON: