diff --git a/colormodes.h b/colormodes.h index 1039d59..ec89176 100644 --- a/colormodes.h +++ b/colormodes.h @@ -207,8 +207,6 @@ void palette_anims() { // Send current palette name to the UI. String name = getPaletteNameWithIndex(currentPaletteIndex); -// name.insert(0, "p"); - //DBG_OUTPUT_PORT.println("p"+name); webSocket.broadcastTXT("p"+name); } } @@ -230,10 +228,7 @@ void palette_anims() { // Send current palette name to the UI. String name = getPaletteNameWithIndex(currentPaletteIndex); - //name.insert(0, "p"); - //DBG_OUTPUT_PORT.println("p"+name); - webSocket.broadcastTXT("p"+name); - + webSocket.broadcastTXT("p"+name); FillLEDsFromPaletteColors(targetPalette,startIndex); } else { FillLEDsFromPaletteColors(targetPalette,startIndex, wipePos); diff --git a/data/palettes/Green_White_Red.bin b/data/palettes/Green_White_Red.bin new file mode 100644 index 0000000..f948ce5 Binary files /dev/null and b/data/palettes/Green_White_Red.bin differ diff --git a/data/palettes/bhw1_greenie.bin b/data/palettes/bhw1_greenie.bin new file mode 100644 index 0000000..74ccb61 Binary files /dev/null and b/data/palettes/bhw1_greenie.bin differ diff --git a/data/palettes/bhw2_xmas.bin b/data/palettes/bhw2_xmas.bin new file mode 100644 index 0000000..a0f0121 Binary files /dev/null and b/data/palettes/bhw2_xmas.bin differ diff --git a/request_handlers.h b/request_handlers.h index b45e0b8..8e700f9 100644 --- a/request_handlers.h +++ b/request_handlers.h @@ -379,10 +379,16 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t length if (settings.palette_ndx >= numberOfPalettes) { settings.palette_ndx = 0; } - currentPaletteIndex = settings.palette_ndx; - DBG_OUTPUT_PORT.printf("Next palette: %d\n", settings.palette_ndx); + + targetPaletteIndex = settings.palette_ndx; loadPaletteFromFile(settings.palette_ndx, &targetPalette); - currentPalette = targetPalette; + + if (settings.glitter_wipe_on) { + wipeInProgress = true; + } + + DBG_OUTPUT_PORT.printf("Next palette: %d\n", settings.palette_ndx); + } else if (payload[1] == 'r') { DBG_OUTPUT_PORT.printf("Randomize palette.\n"); settings.palette_ndx = -1;