Fixed prressing button while Off causing you to never be able to Off again
This commit is contained in:
parent
9312665dfa
commit
c8ecf6744d
@ -444,6 +444,12 @@ void state_switch(uint8_t is_onoff)
|
|||||||
|
|
||||||
if (is_onoff == 0)
|
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)
|
switch (colour_state)
|
||||||
{
|
{
|
||||||
case STATE_SUN_MOON:
|
case STATE_SUN_MOON:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user