Skip to content

Commit

Permalink
Fix for default action not triggering colorUpdated
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Jan 27, 2022
1 parent e879fe5 commit fec870f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wled00/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void shortPressAction(uint8_t b)
if (!macroButton[b]) {
switch (b) {
case 0: toggleOnOff(); colorUpdated(CALL_MODE_BUTTON); break;
default: ++effectCurrent %= strip.getModeCount(); colorUpdated(CALL_MODE_BUTTON); break;
case 1: ++effectCurrent %= strip.getModeCount(); effectChanged = true; colorUpdated(CALL_MODE_BUTTON); break;
}
} else {
applyPreset(macroButton[b], CALL_MODE_BUTTON_PRESET);
Expand All @@ -36,7 +36,7 @@ void longPressAction(uint8_t b)
if (!macroLongPress[b]) {
switch (b) {
case 0: _setRandomColor(false,true); break;
default: bri += 8; colorUpdated(CALL_MODE_BUTTON); buttonPressedTime[b] = millis(); break; // repeatable action
case 1: bri += 8; colorUpdated(CALL_MODE_BUTTON); buttonPressedTime[b] = millis(); break; // repeatable action
}
} else {
applyPreset(macroLongPress[b], CALL_MODE_BUTTON_PRESET);
Expand All @@ -55,7 +55,7 @@ void doublePressAction(uint8_t b)
if (!macroDoublePress[b]) {
switch (b) {
//case 0: toggleOnOff(); colorUpdated(CALL_MODE_BUTTON); break; //instant short press on button 0 if no macro set
default: ++effectPalette %= strip.getPaletteCount(); colorUpdated(CALL_MODE_BUTTON); break;
case 1: ++effectPalette %= strip.getPaletteCount(); effectChanged = true; colorUpdated(CALL_MODE_BUTTON); break;
}
} else {
applyPreset(macroDoublePress[b], CALL_MODE_BUTTON_PRESET);
Expand Down

0 comments on commit fec870f

Please sign in to comment.