From a666d3d6694e894b5cf3333344d83a27bd79391c Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Fri, 4 Oct 2024 08:44:19 +0200 Subject: [PATCH 01/13] makuna/NeoPixelBus@2.8.3 espressif32@6.9.0 --- platformio.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index 59c60b8c1..2f4553f7a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ platform_esp8266 = espressif8266@4.2.1 f_cpu_esp8266 = 160000000L monitor_filters_esp8266 = esp8266_exception_decoder -platform_esp32 = espressif32@6.8.1 +platform_esp32 = espressif32@6.9.0 monitor_filters_esp32 = esp32_exception_decoder framework = arduino @@ -24,7 +24,7 @@ extra_scripts = pre:platformio_version_increment/version_increment_pre.py post:platformio_version_increment/version_increment_post.py lib_deps = - makuna/NeoPixelBus@2.8.2 + makuna/NeoPixelBus@2.8.3 bblanchon/ArduinoJson@7.2.0 knolleary/PubSubClient@2.8.0 ;https://github.com/Makuna/NeoPixelBus.git#master @@ -123,10 +123,10 @@ board_build.filesystem = littlefs monitor_filters = ${common_env_data.monitor_filters_esp32} board_build.f_cpu = 240000000L ;build_type = debug -monitor_port = COM9 +monitor_port = COM4 ;upload_port = COM9 upload_protocol = espota -upload_port = 192.168.1.8 +upload_port = 192.168.1.33 upload_flags = --port=8379 --auth=${secrets.ota_password} @@ -153,7 +153,7 @@ build_flags = '-D WIFI_DEVICE_NAME="GLOW_WORM_ESP32"' '-D MICROCONTROLLER_OTA_PORT=8379' '-D WIFI_SIGNAL_STRENGTH=20.5' - '-D MICROCONTROLLER_IP="192.168.1.36"' + '-D MICROCONTROLLER_IP="192.168.1.33"' '-D IMPROV_ENABLED=30000' ${common_env_data.common_build_flags} From f3613d86bb67d73d0c53e4c7dd1f7dc3fa7cfb20 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Fri, 4 Oct 2024 08:45:04 +0200 Subject: [PATCH 02/13] makuna/NeoPixelBus@2.8.3 espressif32@6.9.0 --- include/Version.h | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Version.h b/include/Version.h index 0831b6844..2bb3cfba3 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,7 +1,7 @@ // AUTO GENERATED FILE, DO NOT EDIT #ifndef VERSION - #define VERSION "5.16.7" + #define VERSION "5.16.8" #endif #ifndef BUILD_TIMESTAMP #define BUILD_TIMESTAMP "2024-09-21 17:00:15.821945" diff --git a/version b/version index 414a9e37f..b9beccbaf 100644 --- a/version +++ b/version @@ -1 +1 @@ -5.16.7 \ No newline at end of file +5.16.8 \ No newline at end of file From a84064e285714962d07ed0075d744a86a3562e0f Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 26 Nov 2024 15:14:27 +0100 Subject: [PATCH 03/13] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 24bda5523..b5b7fcc88 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # Glow Worm Luciferin +Ambilight or Bias Light is a technology that enhances your viewing experience by projecting colored lights onto the wall behind your TV, matching the colors on the screen. This creates a more immersive and engaging atmosphere, making your favorite shows, movies, and games feel even more captivating. + **Luciferin** is a generic term for the light-emitting compound found in organisms that generate bioluminescence like Fireflies and Glow Worms. `Glow Worm Luciferin is a firmware` for ESP8266/ESP32 boards designed for the [Firefly Luciferin](https://github.com/sblantipodi/firefly_luciferin) software, the combination of these software create the perfect From 977969599d693515158faeec70b2e4986929e664 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 26 Nov 2024 19:35:47 +0100 Subject: [PATCH 04/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5b7fcc88..a9e48ab13 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Glow Worm Luciferin -Ambilight or Bias Light is a technology that enhances your viewing experience by projecting colored lights onto the wall behind your TV, matching the colors on the screen. This creates a more immersive and engaging atmosphere, making your favorite shows, movies, and games feel even more captivating. +Ambilight or Bias Light is a technology that enhances your viewing experience by projecting colored lights onto the wall behind your TV/Monitor, matching the colors on the screen. This creates a more immersive and engaging atmosphere, making your favorite shows, movies, and games feel even more captivating. **Luciferin** is a generic term for the light-emitting compound found in organisms that generate bioluminescence like Fireflies and Glow Worms. `Glow Worm Luciferin is a firmware` for ESP8266/ESP32 boards designed for the From 063528b84bf41eae99c49f701a70d04162475d34 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 26 Nov 2024 21:53:14 +0100 Subject: [PATCH 05/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9e48ab13..854a41835 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Glow Worm Luciferin -Ambilight or Bias Light is a technology that enhances your viewing experience by projecting colored lights onto the wall behind your TV/Monitor, matching the colors on the screen. This creates a more immersive and engaging atmosphere, making your favorite shows, movies, and games feel even more captivating. +Ambient Lighting or Bias Light is a technology that enhances your viewing experience by projecting colored lights onto the wall behind your TV/Monitor, matching the colors on the screen. This creates a more immersive and engaging atmosphere, making your favorite shows, movies, and games feel even more captivating. **Luciferin** is a generic term for the light-emitting compound found in organisms that generate bioluminescence like Fireflies and Glow Worms. `Glow Worm Luciferin is a firmware` for ESP8266/ESP32 boards designed for the From 343119405dfa25dcccbad5c91501d6ea458e0a51 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Thu, 12 Dec 2024 22:01:40 +0100 Subject: [PATCH 06/13] lib update --- include/Version.h | 4 ++-- platformio.ini | 2 +- version | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Version.h b/include/Version.h index 2bb3cfba3..5f54c6d5a 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,9 +1,9 @@ // AUTO GENERATED FILE, DO NOT EDIT #ifndef VERSION - #define VERSION "5.16.8" + #define VERSION "5.16.7" #endif #ifndef BUILD_TIMESTAMP - #define BUILD_TIMESTAMP "2024-09-21 17:00:15.821945" + #define BUILD_TIMESTAMP "2024-12-12 21:59:43.430929" #endif \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 2f4553f7a..c85a4c028 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,7 +25,7 @@ extra_scripts = post:platformio_version_increment/version_increment_post.py lib_deps = makuna/NeoPixelBus@2.8.3 - bblanchon/ArduinoJson@7.2.0 + bblanchon/ArduinoJson@7.2.1 knolleary/PubSubClient@2.8.0 ;https://github.com/Makuna/NeoPixelBus.git#master lib_extra_dirs = arduino_bootstrapper diff --git a/version b/version index b9beccbaf..414a9e37f 100644 --- a/version +++ b/version @@ -1 +1 @@ -5.16.8 \ No newline at end of file +5.16.7 \ No newline at end of file From ca5694ba6ad8edcfa9cf064ca158aae0d87aa4d9 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 17 Dec 2024 11:31:58 +0100 Subject: [PATCH 07/13] new effects --- include/EffectsManager.h | 33 +++-- include/Globals.h | 3 +- include/LedManager.h | 1 + include/Version.h | 4 +- src/EffectsManager.cpp | 247 ++++++++++++++++++++++++++++---------- src/Globals.cpp | 38 +++++- src/GlowWormLuciferin.cpp | 95 ++++++++++----- src/LedManager.cpp | 57 +++++++++ src/NetManager.cpp | 10 +- version | 2 +- 10 files changed, 380 insertions(+), 110 deletions(-) diff --git a/include/EffectsManager.h b/include/EffectsManager.h index 3e8c70793..578bcec41 100644 --- a/include/EffectsManager.h +++ b/include/EffectsManager.h @@ -35,24 +35,39 @@ class EffectsManager { public: - static void fire(int cooling, int sparking, int speedDelay, int dynamicLedNum); + static void twinkleRandom(); - static void twinkleRandom(int count, int speedDelay, boolean onlyOne, int dynamicLedNum); + void theaterChaseRainbow(); - void theaterChaseRainbow(int dynamicLedNum); + void mixedRainbow(); - void mixedRainbow(int dynamicLedNum); + void bpm(); - void bpm(int dynamicLedNum); + void colorWipe(byte red, byte green, byte blue); - void rainbow(int dynamicLedNum); + static RgbColor Wheel(uint8_t WheelPos); - void solidRainbow(int dynamicLedNum); + void solidRainbow(); - void colorWipe(int dynamicLedNum, byte red, byte green, byte blue); + static void randomColors(); - static RgbColor Wheel(uint8_t WheelPos); + static void rainbowColors(); + + static void meteor(); + + static void colorWaterfall(); + + static void randomMarquee(); + + static void rainbowMarquee(); + + static void pulsing_rainbow(); + + static void christmas(); + + void fire(int cooling, int sparking, int speedDelay); + void rainbow(boolean slowdown); }; #endif //GLOW_WORM_LUCIFERIN_EFFECTSMANAGER_H diff --git a/include/Globals.h b/include/Globals.h index a96a68ad3..81771e284 100644 --- a/include/Globals.h +++ b/include/Globals.h @@ -70,7 +70,8 @@ extern byte bStored; extern byte brightnessStored; extern boolean autoSave; enum class Effect { - GlowWormWifi, GlowWorm, solid, fire, twinkle, bpm, rainbow, chase_rainbow, solid_rainbow, mixed_rainbow + GlowWormWifi, GlowWorm, solid, fire, twinkle, bpm, rainbow, chase_rainbow, solid_rainbow, slowRainbow, randomColors, + rainbowColors, meteor, colorWaterfall, randomMarquee, rainbowMarquee, pulsing_rainbow, christmas }; extern Effect effect; extern String ffeffect; diff --git a/include/LedManager.h b/include/LedManager.h index 35c00c43c..95ae26311 100644 --- a/include/LedManager.h +++ b/include/LedManager.h @@ -131,6 +131,7 @@ class LedManager { static void manageBuiltInLed(uint8_t r, uint8_t g, uint8_t b); + RgbColor getPixelColor(uint16_t index) const; }; #endif //GLOW_WORM_LUCIFERIN_LEDMANAGER_H diff --git a/include/Version.h b/include/Version.h index 5f54c6d5a..73ed466fd 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,9 +1,9 @@ // AUTO GENERATED FILE, DO NOT EDIT #ifndef VERSION - #define VERSION "5.16.7" + #define VERSION "5.16.124" #endif #ifndef BUILD_TIMESTAMP - #define BUILD_TIMESTAMP "2024-12-12 21:59:43.430929" + #define BUILD_TIMESTAMP "2024-12-17 11:27:51.613976" #endif \ No newline at end of file diff --git a/src/EffectsManager.cpp b/src/EffectsManager.cpp index 7c87e04ed..64693ec7a 100644 --- a/src/EffectsManager.cpp +++ b/src/EffectsManager.cpp @@ -21,20 +21,21 @@ #include "EffectsManager.h" RgbColor color = EffectsManager::Wheel(random(0, 255));; +unsigned long preMill = 0; +int position = 0; /** * Fire effect * @param cooling config effect param * @param sparking config effect param * @param speedDelay config effect param - * @param dynamicLedNum config effect param */ -void EffectsManager::fire(int cooling, int sparking, int speedDelay, int dynamicLedNum) { +void EffectsManager::fire(int cooling, int sparking, int speedDelay) { static byte heat[NUM_LEDS]; int cooldown; // Step 1. Cool down every cell a little - for (int i = 0; i < dynamicLedNum; i++) { - cooldown = random(0, ((cooling * 10) / dynamicLedNum) + 2); + for (int i = 0; i < ledManager.dynamicLedNum; i++) { + cooldown = random(0, ((cooling * 10) / ledManager.dynamicLedNum) + 2); if (cooldown > heat[i]) { heat[i] = 0; } else { @@ -42,7 +43,7 @@ void EffectsManager::fire(int cooling, int sparking, int speedDelay, int dynamic } } // Step 2. Heat from each cell drifts 'up' and diffuses a little - for (int k = dynamicLedNum - 1; k >= 2; k--) { + for (int k = ledManager.dynamicLedNum - 1; k >= 2; k--) { heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2]) / 3; } // Step 3. Randomly ignite new 'sparks' near the bottom @@ -52,7 +53,7 @@ void EffectsManager::fire(int cooling, int sparking, int speedDelay, int dynamic //heat[y] = random(160,255); } // Step 4. Convert heat to LED colors - for (int j = 0; j < dynamicLedNum; j++) { + for (int j = 0; j < ledManager.dynamicLedNum; j++) { // Scale 'heat' down from 0-255 to 0-191 byte t192 = (byte) round((heat[j] / 255.0) * 191); // calculate ramp up from @@ -71,24 +72,138 @@ void EffectsManager::fire(int cooling, int sparking, int speedDelay, int dynamic delay(speedDelay); } +void EffectsManager::randomColors() { + unsigned long curMill = millis(); + if (curMill - preMill >= 150) { + preMill = curMill; + for (int i = 0; i < ledManager.dynamicLedNum; i++) { + ledManager.setPixelColor(i, (brightness * random(0, 255)), (brightness * random(0, 255)), + (brightness * random(0, 255))); + } + ledManager.ledShow(); + } +} + +void EffectsManager::rainbowColors() { + unsigned long curMill = millis(); + if (curMill - preMill >= 20) { + preMill = curMill; + static uint8_t hue = 0; + for (uint16_t i = 0; i < ledManager.dynamicLedNum; i++) { + RgbColor c = HslColor(hue / 255.0f, 1.0f, 0.5f); + ledManager.setPixelColor(i, c.R, c.G, c.B); + } + ledManager.ledShow(); + hue++; + } +} + +void EffectsManager::meteor() { + unsigned long curMill = millis(); + if (curMill - preMill >= 10) { + previousMillis = curMill; + ledManager.setPixelColor(position, ledManager.red, ledManager.green, ledManager.blue); + ledManager.setPixelColor(ledManager.dynamicLedNum - 1, 0,0,0); + if (position > 0) { ledManager.setPixelColor(position - 1, 0,0,0); } + ledManager.ledShow(); + position = (position + 1) % ledManager.dynamicLedNum; + } +} + +void EffectsManager::colorWaterfall() { + unsigned long curMill = millis(); + if (curMill - preMill >= 400) { + preMill = curMill; + RgbColor c = RgbColor(random(0, 255), random(0, 255), random(0, 255)); + for (uint16_t i = 0; i < ledManager.dynamicLedNum; i++) { ledManager.setPixelColor(i, c.R, c.G, c.B); } + ledManager.ledShow(); + delay(20); + } +} + +uint8_t hue = 0; +int currentPixel = 0; +void EffectsManager::randomMarquee() { + unsigned long curMill = millis(); + if (curMill - preMill >= 150) { + preMill = curMill; + for (int i = 0; i < ledManager.dynamicLedNum; i++) { + if (i % 3 == currentPixel % 3) { + ledManager.setPixelColor(i, random(0, 255), random(0, 255), random(0, 255)); + } else { + ledManager.setPixelColor(i, 0,0,0); + } + } + ledManager.ledShow(); + currentPixel++; + } +} + +void EffectsManager::rainbowMarquee() { + unsigned long curMill = millis(); + if (curMill - preMill >= 150) { + preMill = curMill; + for (int i = 0; i < ledManager.dynamicLedNum; i++) { + if (i % 3 == currentPixel % 3) { + RgbColor c = HslColor(((i * 256 / ledManager.dynamicLedNum) + hue) / 255.0f, 1.0f, 0.5f); + ledManager.setPixelColor(i, c.R, c.G, c.B); + } else { + ledManager.setPixelColor(i, 0,0,0); + } + } + hue++; + ledManager.ledShow(); + currentPixel++; + } +} + +void EffectsManager::pulsing_rainbow() { + unsigned long curMill = millis(); + if (curMill - preMill >= 20/10) { + preMill = curMill; + for (uint16_t i = 0; i < ledManager.dynamicLedNum; i++) { + RgbColor c = HslColor(((i * 256 / ledManager.dynamicLedNum) + hue) / 255.0f, 1.0f, 0.5f); + ledManager.setPixelColor(i, c.R, c.G, c.B); + } + ledManager.ledShow(); + hue++; + } +} + +void EffectsManager::christmas() { + unsigned long curMill = millis(); + if (curMill - preMill >= 300) { + preMill = curMill; + for (uint16_t i = 0; i < ledManager.dynamicLedNum; i++) { + RgbColor c = HslColor(hue / 255.0f, 1.0f, 0.5f); + ledManager.setPixelColor(i, c.R, c.G, c.B); + hue++; + } + ledManager.ledShow(); + } +} + /** * Twinkle effect * @param count config effect param * @param speedDelay config effect param * @param onlyOne config effect param - * @param dynamicLedNum config effect param + * @param ledManager.dynamicLedNum config effect param */ -void EffectsManager::twinkleRandom(int count, int speedDelay, boolean onlyOne, int dynamicLedNum) { - LedManager::setColor(1, 1, 1); - for (int i = 0; i < count; i++) { - ledManager.setPixelColor(random(dynamicLedNum), random(0, 255), random(0, 255), random(0, 255)); - ledManager.ledShow(); - delay(speedDelay); - if (onlyOne) { - LedManager::setColor(1, 1, 1); +void EffectsManager::twinkleRandom() { + unsigned long curMill = millis(); + if (curMill - preMill >= 200) { + preMill = curMill; + int pixelIndex = random(ledManager.dynamicLedNum); + RgbColor c = RgbColor(random(256), random(256), random(256)); + ledManager.setPixelColor(pixelIndex, c.R, c.G, c.B); + for (uint16_t i = 0; i < ledManager.dynamicLedNum; i++) { + RgbColor currentColor = ledManager.getPixelColor(i); + RgbColor dimColor = RgbColor(currentColor.R / 1.05, currentColor.G / 1.05, currentColor.B / 1.05); + ledManager.setPixelColor(i, dimColor.R, dimColor.G, dimColor.B); } + ledManager.ledShow(); } - delay(speedDelay); } byte * WheelByte(byte WheelPos) { @@ -127,8 +242,8 @@ RgbColor EffectsManager::Wheel(uint8_t WheelPos) { } uint16_t iWipe; -void EffectsManager::colorWipe(int dynamicLedNum, byte rw, byte gw, byte bw) { - if (iWipe < dynamicLedNum) { +void EffectsManager::colorWipe(byte rw, byte gw, byte bw) { + if (iWipe < ledManager.dynamicLedNum) { if (millis() - lastAnim >= 15) { lastAnim = millis(); ledManager.setPixelColor(iWipe, rw, gw, bw); @@ -143,42 +258,46 @@ void EffectsManager::colorWipe(int dynamicLedNum, byte rw, byte gw, byte bw) { /** * Theater chase rainbow effect - * @param dynamicLedNum number of leds + */ -void EffectsManager::theaterChaseRainbow(int dynamicLedNum) { - colorWipe(dynamicLedNum, color.R, color.G, color.B); +void EffectsManager::theaterChaseRainbow() { + colorWipe(color.R, color.G, color.B); } /** * Mixed Rainbow effect - * @param dynamicLedNum number of leds + */ uint16_t jMixed = 0; uint16_t Mixed = 0; -void EffectsManager::mixedRainbow(int dynamicLedNum) { - byte *c; - if (Mixed == 3) { - jMixed++; - } - if (jMixed < 256) { // cycle all 256 colors in the wheel - if (Mixed < 3) { - if (millis() - lastAnim >= 20) { - lastAnim = millis(); - for (int z = 0; z < dynamicLedNum; z = z + 3) { - c = WheelByte((z + jMixed) % 255); - ledManager.setPixelColor(z + Mixed, *c, *(c + 1), *(c + 2)); //turn every third pixel on - } - ledManager.ledShow(); - for (int k = 0; k < dynamicLedNum; k = k + 3) { - ledManager.setPixelColor(k + Mixed, 0, 0, 0); //turn every third pixel off +void EffectsManager::mixedRainbow() { + unsigned long curMill = millis(); + if (curMill - preMill >= 500) { + preMill = curMill; + byte *c; + if (Mixed == 3) { + jMixed++; + } + if (jMixed < 256) { // cycle all 256 colors in the wheel + if (Mixed < 3) { + if (millis() - lastAnim >= 20) { + lastAnim = millis(); + for (int z = 0; z < ledManager.dynamicLedNum; z = z + 3) { + c = WheelByte((z + jMixed) % 255); + ledManager.setPixelColor(z + Mixed, *c, *(c + 1), *(c + 2)); //turn every third pixel on + } + ledManager.ledShow(); + for (int k = 0; k < ledManager.dynamicLedNum; k = k + 3) { + ledManager.setPixelColor(k + Mixed, 0, 0, 0); //turn every third pixel off + } + Mixed++; } - Mixed++; + } else { + Mixed = 0; } } else { - Mixed = 0; + jMixed = 0; } - } else { - jMixed = 0; } } @@ -191,7 +310,7 @@ void setAll(int dynamicLedNum, byte red, byte green, byte blue) { int kFade = 0; bool stepFadeIn = true; -void FadeInOut(int dynamicLedNum, byte red, byte green, byte blue) { +void FadeInOut(byte red, byte green, byte blue) { float r, g, b; if (stepFadeIn && kFade == 255) { stepFadeIn = false; @@ -204,13 +323,13 @@ void FadeInOut(int dynamicLedNum, byte red, byte green, byte blue) { r = (kFade / 256.0) * red; g = (kFade / 256.0) * green; b = (kFade / 256.0) * blue; - setAll(dynamicLedNum, r, g, b); + setAll(ledManager.dynamicLedNum, r, g, b); kFade = kFade + 1; } else if (kFade >= 0 && !stepFadeIn) { r = (kFade / 256.0) * red; g = (kFade / 256.0) * green; b = (kFade / 256.0) * blue; - setAll(dynamicLedNum, r, g, b); + setAll(ledManager.dynamicLedNum, r, g, b); kFade = kFade - 2; } } @@ -218,45 +337,49 @@ void FadeInOut(int dynamicLedNum, byte red, byte green, byte blue) { /** * BPM effect */ -void EffectsManager::bpm(int dynamicLedNum) { - FadeInOut(dynamicLedNum, color.R, color.G, color.B); +void EffectsManager::bpm() { + + FadeInOut(color.R, color.G, color.B); } /** * Rainbow effect - * @param dynamicLedNum number of leds */ byte *cT; uint16_t iT, jT; -void EffectsManager::rainbow(int dynamicLedNum) { - if (jT<256*5) { // 5 cycles of all colors on wheel - if (millis() - lastAnim >= 2) { - lastAnim = millis(); - for (iT = 0; iT < dynamicLedNum; iT++) { - cT = WheelByte(((iT * 256 / dynamicLedNum) + jT) & 255); - ledManager.setPixelColor(iT, *cT, *(cT + 1), *(cT + 2)); +void EffectsManager::rainbow(boolean slowdown) { + unsigned long curMill = millis(); + int raindelay = slowdown ? 100 : 0; + if (curMill - preMill >= raindelay) { + preMill = curMill; + if (jT < 256 * 5) { // 5 cycles of all colors on wheel + if (millis() - lastAnim >= 2) { + lastAnim = millis(); + for (iT = 0; iT < ledManager.dynamicLedNum; iT++) { + cT = WheelByte(((iT * 256 / ledManager.dynamicLedNum) + jT) & 255); + ledManager.setPixelColor(iT, *cT, *(cT + 1), *(cT + 2)); + } + ledManager.ledShow(); + jT++; } - ledManager.ledShow(); - jT++; + } else { + jT = 0; } - } else { - jT = 0; } } /** * Solid rainbow effect - * @param dynamicLedNum number of leds */ int xSolidRainbow = 0; int ySolidRainbow = 0; -void EffectsManager::solidRainbow(int dynamicLedNum) { +void EffectsManager::solidRainbow() { if (xSolidRainbow <= 9) { //9 cycles of rainbow color if (ySolidRainbow < 360) {//360 shades - NeoPixelBus uses float if (millis() - lastAnim >= 100) { lastAnim = millis(); RgbColor rgb = RgbColor(HslColor(ySolidRainbow / 360.0f, 1.0f, 0.25f)); - for (int i = 0; i < dynamicLedNum; i++) { + for (int i = 0; i < ledManager.dynamicLedNum; i++) { ledManager.setPixelColor(i, rgb.R, rgb.G, rgb.B); } ledManager.ledShow(); diff --git a/src/Globals.cpp b/src/Globals.cpp index 3bb20ae8c..179677c53 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -305,16 +305,32 @@ const char *Globals::effectToString(Effect e) { return "Twinkle"; case Effect::rainbow: return "Rainbow"; + case Effect::slowRainbow: + return "Slow Rainbow"; case Effect::chase_rainbow: return "Chase rainbow"; case Effect::solid_rainbow: return "Solid rainbow"; - case Effect::mixed_rainbow: - return "Mixed rainbow"; case Effect::GlowWorm: return "GlowWorm"; case Effect::GlowWormWifi: return "GlowWormWifi"; + case Effect::randomColors: + return "randomColor"; + case Effect::rainbowColors: + return "rainbowColors"; + case Effect::meteor: + return "meteor"; + case Effect::colorWaterfall: + return "colorWaterfall"; + case Effect::randomMarquee: + return "randomMarquee"; + case Effect::rainbowMarquee: + return "rainbowMarquee"; + case Effect::pulsing_rainbow: + return "pulsing_rainbow"; + case Effect::christmas: + return "christmas"; default: return "Solid"; } @@ -334,8 +350,24 @@ const uint8_t Globals::effectToInt(Effect e) { return 7; case Effect::solid_rainbow: return 8; - case Effect::mixed_rainbow: + case Effect::slowRainbow: return 9; + case Effect::randomColors: + return 10; + case Effect::rainbowColors: + return 11; + case Effect::meteor: + return 12; + case Effect::colorWaterfall: + return 13; + case Effect::randomMarquee: + return 14; + case Effect::rainbowMarquee: + return 15; + case Effect::pulsing_rainbow: + return 16; + case Effect::christmas: + return 17; case Effect::GlowWorm: return 1; case Effect::GlowWormWifi: diff --git a/src/GlowWormLuciferin.cpp b/src/GlowWormLuciferin.cpp index 7428824c1..40e7d484f 100644 --- a/src/GlowWormLuciferin.cpp +++ b/src/GlowWormLuciferin.cpp @@ -268,7 +268,6 @@ void setApState(byte state) { } #endif - /** * Main loop */ @@ -416,7 +415,7 @@ void mainLoop() { effect = Effect::rainbow; break; case 11: - effect = Effect::mixed_rainbow; + effect = Effect::slowRainbow; break; case 12: effect = Effect::chase_rainbow; @@ -424,6 +423,30 @@ void mainLoop() { case 13: effect = Effect::solid_rainbow; break; + case 14: + effect = Effect::randomColors; + break; + case 15: + effect = Effect::rainbowColors; + break; + case 16: + effect = Effect::meteor; + break; + case 17: + effect = Effect::colorWaterfall; + break; + case 18: + effect = Effect::randomMarquee; + break; + case 19: + effect = Effect::rainbowMarquee; + break; + case 20: + effect = Effect::pulsing_rainbow; + break; + case 21: + effect = Effect::christmas; + break; case 100: ledManager.fireflyEffectInUse = 0; break; @@ -469,9 +492,7 @@ void mainLoop() { } ledManager.lastLedUpdate = millis(); framerateCounterSerial++; - if (effect != Effect::mixed_rainbow) { - ledManager.ledShow(); - } + ledManager.ledShow(); } } } @@ -482,48 +503,60 @@ void mainLoop() { #endif } - if (effect == Effect::GlowWorm || effect == Effect::GlowWormWifi) { - temporaryDisableImprove = true; - } else { + if (effect == Effect::solid) { temporaryDisableImprove = false; + } else { + temporaryDisableImprove = true; } breakLoop = false; - //EFFECT BPM if (effect == Effect::bpm) { - effectsManager.bpm(ledManager.dynamicLedNum); + effectsManager.bpm(); + } + if (effect == Effect::fire) { + effectsManager.fire(55, 120, 15); } - - //EFFECT RAINBOW if (effect == Effect::rainbow) { - effectsManager.rainbow(ledManager.dynamicLedNum); + effectsManager.rainbow(false); } - - //SOLID RAINBOW - if (effect == Effect::solid_rainbow) { - effectsManager.solidRainbow(ledManager.dynamicLedNum); + if (effect == Effect::slowRainbow) { + effectsManager.rainbow(true); } - - //FIRE - if (effect == Effect::fire) { - EffectsManager::fire(55, 120, 15, ledManager.dynamicLedNum); + if (effect == Effect::solid_rainbow) { + effectsManager.solidRainbow(); } - - //TWINKLE if (effect == Effect::twinkle) { - EffectsManager::twinkleRandom(20, 100, false, ledManager.dynamicLedNum); + EffectsManager::twinkleRandom(); } - - //CHASE RAINBOW if (effect == Effect::chase_rainbow) { - effectsManager.theaterChaseRainbow(ledManager.dynamicLedNum); + effectsManager.theaterChaseRainbow(); } - - //MIXED RAINBOW - if (effect == Effect::mixed_rainbow) { - effectsManager.mixedRainbow(ledManager.dynamicLedNum); + if (effect == Effect::randomColors) { + EffectsManager::randomColors(); } + if (effect == Effect::rainbowColors) { + EffectsManager::rainbowColors(); + } + if (effect == Effect::meteor) { + EffectsManager::meteor(); + } + if (effect == Effect::colorWaterfall) { + EffectsManager::colorWaterfall(); + } + if (effect == Effect::randomMarquee) { + EffectsManager::randomMarquee(); + } + if (effect == Effect::rainbowMarquee) { + EffectsManager::rainbowMarquee(); + } + if (effect == Effect::pulsing_rainbow) { + EffectsManager::pulsing_rainbow(); + } + if (effect == Effect::christmas) { + EffectsManager::christmas(); + } + } void setSerialPixel(int j, byte r, byte g, byte b) { diff --git a/src/LedManager.cpp b/src/LedManager.cpp index 3300eee0f..5aed03bb8 100644 --- a/src/LedManager.cpp +++ b/src/LedManager.cpp @@ -300,6 +300,63 @@ void LedManager::setPixelColor(uint16_t index, uint8_t rToOrder, uint8_t gToOrde #endif } +RgbColor convertRgbwToRgb(const RgbwColor &color) { + return RgbColor(color.R, color.G, color.B); +} + +RgbColor LedManager::getPixelColor(uint16_t index) const { + RgbColor rgbColor; + RgbwColor rgbwColor; +#if defined(ARDUINO_ARCH_ESP32) + switch (colorMode) { + case 1: + return ledsEsp32->GetPixelColor(index); + case 2: + case 3: + case 4: + return convertRgbwToRgb(ledsEsp32Rgbw->GetPixelColor(index)); + case 5: + return ledsEsp32DotStar->GetPixelColor(index); + } +#else + if (gpioInUse == 3) { + switch (colorMode) { + case 1: + return ledsDma->GetPixelColor(index); + case 2: + case 3: + case 4: + return convertRgbwToRgb(ledsDmaRgbw->GetPixelColor(index)); + case 5: + return ledsDotStar->GetPixelColor(index); + } + } else if (gpioInUse == 2) { + switch (colorMode) { + case 1: + return ledsUart->GetPixelColor(index); + case 2: + case 3: + case 4: + return convertRgbwToRgb(ledsUartRgbw->GetPixelColor(index)); + case 5: + return ledsDotStar->GetPixelColor(index); + } + } else { + switch (colorMode) { + case 1: + return ledsStandard->GetPixelColor(index); + case 2: + case 3: + case 4: + return convertRgbwToRgb(ledsStandardRgbw->GetPixelColor(index)); + case 5: + return ledsDotStar->GetPixelColor(index); + } + } +#endif + return RgbColor(0,0,0); +} + /** * Clean the LEDs before reinit */ diff --git a/src/NetManager.cpp b/src/NetManager.cpp index f9149867e..59cfc5e44 100644 --- a/src/NetManager.cpp +++ b/src/NetManager.cpp @@ -873,7 +873,15 @@ bool NetManager::processJson() { else if (requestedEffect == "Rainbow") effect = Effect::rainbow; else if (requestedEffect == "Chase rainbow") effect = Effect::chase_rainbow; else if (requestedEffect == "Solid rainbow") effect = Effect::solid_rainbow; - else if (requestedEffect == "Mixed rainbow") effect = Effect::mixed_rainbow; + else if (requestedEffect == "Random colors") effect = Effect::randomColors; + else if (requestedEffect == "Rainbow colors") effect = Effect::rainbowColors; + else if (requestedEffect == "Meteor") effect = Effect::meteor; + else if (requestedEffect == "Color waterfall") effect = Effect::colorWaterfall; + else if (requestedEffect == "Random marquee") effect = Effect::randomMarquee; + else if (requestedEffect == "Rainbow marquee") effect = Effect::rainbowMarquee; + else if (requestedEffect == "Pulsing rainbow") effect = Effect::pulsing_rainbow; + else if (requestedEffect == "Christmas") effect = Effect::christmas; + else if (requestedEffect == "Slow rainbow") effect = Effect::slowRainbow; else { effect = Effect::solid; breakLoop = true; diff --git a/version b/version index 414a9e37f..a637acc71 100644 --- a/version +++ b/version @@ -1 +1 @@ -5.16.7 \ No newline at end of file +5.16.124 \ No newline at end of file From 904bec1998388c8ae9bd308a98b0e4e156287d92 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 17 Dec 2024 13:16:58 +0100 Subject: [PATCH 08/13] new effects --- include/Globals.h | 3 +++ src/Globals.cpp | 4 +++- src/NetManager.cpp | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/Globals.h b/include/Globals.h index 81771e284..8b851c8dd 100644 --- a/include/Globals.h +++ b/include/Globals.h @@ -75,6 +75,9 @@ enum class Effect { }; extern Effect effect; extern String ffeffect; +// TODO remove +extern String iip; +extern String bbip; extern float framerate; extern float framerateSerial; extern float framerateCounter; diff --git a/src/Globals.cpp b/src/Globals.cpp index 179677c53..fa158c22c 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -29,7 +29,9 @@ LedManager ledManager; NetManager netManager; Helpers helper; Globals globals; - +// TODO remove + String iip; + String bbip; // DPsoftware checksum for serial byte config[CONFIG_NUM_PARAMS]; byte pre[CONFIG_PREFIX_LENGTH]; diff --git a/src/NetManager.cpp b/src/NetManager.cpp index 59cfc5e44..d3c998c71 100644 --- a/src/NetManager.cpp +++ b/src/NetManager.cpp @@ -65,6 +65,8 @@ void NetManager::getUDPStream() { remoteIpForUdp = broadcastUDP.remoteIP(); Serial.println(F("-> Setting IP to use <-")); Serial.println(remoteIpForUdp.toString()); + // TODO remove + iip = remoteIpForUdp.toString(); } } else { if (netManager.remoteIpForUdpBroadcast.toString().equals(remoteIpForUdp.toString())) { @@ -78,6 +80,8 @@ void NetManager::getUDPStream() { remoteIpForUdpBroadcast.fromString(broadCastAddress); Serial.println(F("-> Setting Broadcast IP to use <-")); Serial.println(remoteIpForUdpBroadcast.toString()); + // TODO remove + bbip = remoteIpForUdpBroadcast.toString(); } } } @@ -1015,6 +1019,12 @@ void NetManager::sendStatus() { } // Built in led triggered ledTriggered = true; +// TODO remove + Serial.println(F("-> Broadcast IP to use <-")); + Serial.println(bbip); +// TODO remove + Serial.println(F("-> IP to use <-")); + Serial.println(iip); } /** From bc4a8ba4f1cebb9b99c51e48ce084115435fe2d3 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 17 Dec 2024 13:35:48 +0100 Subject: [PATCH 09/13] new effects --- src/Globals.cpp | 3 --- src/NetManager.cpp | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/src/Globals.cpp b/src/Globals.cpp index fa158c22c..5af932524 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -29,9 +29,6 @@ LedManager ledManager; NetManager netManager; Helpers helper; Globals globals; -// TODO remove - String iip; - String bbip; // DPsoftware checksum for serial byte config[CONFIG_NUM_PARAMS]; byte pre[CONFIG_PREFIX_LENGTH]; diff --git a/src/NetManager.cpp b/src/NetManager.cpp index d3c998c71..59cfc5e44 100644 --- a/src/NetManager.cpp +++ b/src/NetManager.cpp @@ -65,8 +65,6 @@ void NetManager::getUDPStream() { remoteIpForUdp = broadcastUDP.remoteIP(); Serial.println(F("-> Setting IP to use <-")); Serial.println(remoteIpForUdp.toString()); - // TODO remove - iip = remoteIpForUdp.toString(); } } else { if (netManager.remoteIpForUdpBroadcast.toString().equals(remoteIpForUdp.toString())) { @@ -80,8 +78,6 @@ void NetManager::getUDPStream() { remoteIpForUdpBroadcast.fromString(broadCastAddress); Serial.println(F("-> Setting Broadcast IP to use <-")); Serial.println(remoteIpForUdpBroadcast.toString()); - // TODO remove - bbip = remoteIpForUdpBroadcast.toString(); } } } @@ -1019,12 +1015,6 @@ void NetManager::sendStatus() { } // Built in led triggered ledTriggered = true; -// TODO remove - Serial.println(F("-> Broadcast IP to use <-")); - Serial.println(bbip); -// TODO remove - Serial.println(F("-> IP to use <-")); - Serial.println(iip); } /** From 3f879ef40cc5d26413a28d79251c072ed1faa4f6 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 17 Dec 2024 14:23:24 +0100 Subject: [PATCH 10/13] new effects --- docs/webInterface_1.5.0.slim.min.js | 187 ++++++++++++++++++++++++++++ include/Version.h | 4 +- include/WebSettings.h | 2 +- version | 2 +- 4 files changed, 191 insertions(+), 4 deletions(-) create mode 100644 docs/webInterface_1.5.0.slim.min.js diff --git a/docs/webInterface_1.5.0.slim.min.js b/docs/webInterface_1.5.0.slim.min.js new file mode 100644 index 000000000..65beb0807 --- /dev/null +++ b/docs/webInterface_1.5.0.slim.min.js @@ -0,0 +1,187 @@ +function poll() { + var poll = (promiseFn, time) => promiseFn().then(sleep(time).then(() => poll(promiseFn, time))) + poll(() => new Promise(() => { + const http = new XMLHttpRequest(); + http.open('GET', 'prefs'); + http.send(); + http.onload = () => { + console.log(http.responseText); + var prefs = JSON.parse(http.responseText); + console.log(prefs); + if (prefs.toggle == '0') { + $('#toggleLED').css('background-color','lightgrey'); + $('#toggleLED')[0].textContent = "Turn ON"; + $('#toggleLED').removeClass("active"); + } else if (prefs.toggle == '1') { + $('#toggleLED').css('background-color','orange'); + $('#toggleLED')[0].textContent = "Turn OFF"; + $('#toggleLED').addClass("active"); + } + if (prefs.effect == "GlowWormWifi") { + $('#effectSelect').val((prefs.ffeffect.length == 0 || prefs.ffeffect == 'null') ? 'Solid' : prefs.ffeffect); + } else { + $('#effectSelect').val((prefs.effect.length == 0 || prefs.effect == 'null') ? 'Solid' : prefs.effect); + } + kelvinPicker.color.set({ kelvin: (prefs.whiteTemp*100) }); + if (prefs.whiteTemp == 65) { $("#ut").show(); } else { $("#ut").hide(); } + if (prefs.cp.length > 0) { + colorPicker.color.rgb = { r: prefs.cp.split(',')[0], g: prefs.cp.split(',')[1], b: prefs.cp.split(',')[2] } + } + brightnessSlider.color.rgb = colorPicker.color.rgb; + brightnessSlider.colors[0].value=Math.round((100*prefs.brightness)/255); + $('#gitlink').text("Glow Worm Luciferin (V"+prefs.VERSION+')'); + if (prefs.wifi >= 0) { + $('#wifi').text(prefs.wifi + '% '); + $('#wf').show(); + $('#et').hide(); + } else { + $('#wf').hide(); + $('#et').show(); + } + $('#fps').text(prefs.framerate + 'FPS'); + if (prefs.ldr) { + $('#ldrgrp').show(); + $('#ldr').text(Math.round(prefs.ldr) + '%'); + } else { + $('#ldrgrp').hide(); + } + $("#autosave").prop('checked', prefs.autosave == 1); + } + }), 5000); +} +function callDevice(payload) { + console.log(payload); + const http = new XMLHttpRequest(); + http.open('GET', 'set?payload=' + payload); + http.send(); + http.onload = () => console.log(http.responseText); +} +function createPayload() { + var toggleLED = $('#toggleLED')[0]; + var payload = { + state: toggleLED.classList.contains('active') ? 'ON' : 'OFF', + effect: $('#effectSelect').val(), + color: colorPicker.color.rgb, + whitetemp: Math.round(kelvinPicker.color.kelvin/100), + brightness: Math.round((brightnessSlider.color.value * 255) / 100), + allInstances: 1 + } + return payload; +} +var colorPicker = new iro.ColorPicker('#picker', { + width: 320, + color: '#0091ff', + layout: [ + { + component: iro.ui.Wheel + } + ] +}); +var brightnessSlider = new iro.ColorPicker("#brightnessSlider", { + width: 300, + color: colorPicker.color.rgb, + borderWidth: 1, + borderColor: "#fff", + layout: [ + { + component: iro.ui.Slider, + options: { + sliderType: 'value' + } + } + ] +}); +var kelvinPicker = new iro.ColorPicker("#kelvinPicker", { + width: 360, + color: "rgb(255, 0, 0)", + borderWidth: 1, + borderColor: "#fff", + layoutDirection: 'vertical', + layout: [ + { + component: iro.ui.Slider, + options: { + sliderType: 'kelvin', + sliderSize: 40, + minTemperature: 2000, + maxTemperature: 11000 + } + }, + ] +}); +$('#effectSelect').change(function () { + callDevice(JSON.stringify(createPayload())); +}); +$('#whiteTempSelect').change(function () { + callDevice(JSON.stringify(createPayload())); +}); +brightnessSlider.on(['input:end'], function(color) { + callDevice(JSON.stringify(createPayload())); +}); +kelvinPicker.on(['input:end'], function(color) { + callDevice(JSON.stringify(createPayload())); +}); +kelvinPicker.on(['color:change'], function(color) { + if (Math.round(kelvinPicker.color.kelvin/100) == 65) { $("#ut").show(); } else { $("#ut").hide(); } +}); +$('#toggleLED').click(function () { + callDevice(JSON.stringify(createPayload())); + var toggleLED = $('#toggleLED')[0]; + if (toggleLED.classList.contains('active')) { + $('#toggleLED').css('background-color','orange'); + $('#toggleLED')[0].textContent = "Turn OFF"; + } else { + $('#toggleLED').css('background-color','lightgrey'); + $('#toggleLED')[0].textContent = "Turn ON"; + } +}); +colorPicker.on(['input:end'], function(color) { + callDevice(JSON.stringify(createPayload())); +}); +colorPicker.on(['color:change'], function () { + brightnessSlider.color.rgb = colorPicker.color.rgb; +}); +const sleep = (s) => { + return new Promise(resolve => setTimeout(resolve, (s))); +}; +sleep(100).then(() => { + $("#subtitle").text("Bias Lighting and Ambient Light firmware designed for Firefly Luciferin") + $("#ut").text("No white balance") + $('#effectSelect').append(new Option("Solid", "Solid")); + $('#effectSelect').append(new Option("Fire", "Fire")); + $('#effectSelect').append(new Option("Twinkle", "Twinkle")); + $('#effectSelect').append(new Option("Bpm", "Bpm")); + $('#effectSelect').append(new Option("Rainbow", "Rainbow")); + $('#effectSelect').append(new Option("Slow rainbow", "Slow rainbow")); + $('#effectSelect').append(new Option("Chase rainbow", "Chase rainbow")); + $('#effectSelect').append(new Option("Solid rainbow", "Solid rainbow")); + $('#effectSelect').append(new Option("Random colors", "Random colors")); + $('#effectSelect').append(new Option("Rainbow colors", "Rainbow colors")); + $('#effectSelect').append(new Option("Meteor", "Meteor")); + $('#effectSelect').append(new Option("Color waterfall", "Color waterfall")); + $('#effectSelect').append(new Option("Random marquee", "Random marquee")); + $('#effectSelect').append(new Option("Rainbow marquee", "Rainbow marquee")); + $('#effectSelect').append(new Option("Pulsing rainbow", "Pulsing rainbow")); + $('#effectSelect').append(new Option("Christmas", "Christmas")); + $('#effectSelect').append(new Option("Bias light", "Bias light")); + $('#effectSelect').append(new Option("Music mode (VU Meter)", "Music mode (VU Meter)")); + $('#effectSelect').append(new Option("Music mode (Stereo VU Meter)", "Music mode (Stereo VU Meter)")); + $('#effectSelect').append(new Option("Music mode (Screen capture)", "Music mode (Screen capture)")); + $('#effectSelect').append(new Option("Music mode (Rainbow music)", "Music mode (Rainbow music)")); + poll(); +}); +function asCBAction(cbAs) { + var strConfirm = "If auto save is enabled, color and brightness information is stored into memory to retain this settings after reboot.\nIf you change color often, this can stress the small memory on your microcontroller.\nIn that case it is recommended to disable auto save.\nIf you want to save only one color as default, please enable auto save, choose the desired color and then disable auto save.\n\nDo you want to enable auto save now?"; + if (($("#autosave").prop('checked') && confirm(strConfirm)) || !($("#autosave").prop('checked'))) { + const http = new XMLHttpRequest(); + if (cbAs.checked) { + http.open('GET', 'setAutoSave?autosave=1'); + } else { + http.open('GET', 'setAutoSave?autosave=0'); + } + http.send(); + http.onload = () => console.log(http.responseText); + } else { + $("#autosave").prop('checked', false); + } +} diff --git a/include/Version.h b/include/Version.h index 73ed466fd..87242c4ec 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,9 +1,9 @@ // AUTO GENERATED FILE, DO NOT EDIT #ifndef VERSION - #define VERSION "5.16.124" + #define VERSION "5.16.150" #endif #ifndef BUILD_TIMESTAMP - #define BUILD_TIMESTAMP "2024-12-17 11:27:51.613976" + #define BUILD_TIMESTAMP "2024-12-17 14:02:44.384645" #endif \ No newline at end of file diff --git a/include/WebSettings.h b/include/WebSettings.h index 50d113bf2..854f970e4 100644 --- a/include/WebSettings.h +++ b/include/WebSettings.h @@ -21,7 +21,7 @@ #ifndef GLOW_WORM_LUCIFERIN_WEBSETTINGS_H #define GLOW_WORM_LUCIFERIN_WEBSETTINGS_H -const char settingsPage[] PROGMEM = R"=====(LUCIFERIN Web Interface

LUCIFERIN

_/ _ / _
_
)====="; +const char settingsPage[] PROGMEM = R"=====(LUCIFERIN Web Interface

LUCIFERIN

_/ _ / _
_
)====="; const char setSettingsPage[] PROGMEM = R"=====(LUCIFERIN Web Interface

LUCIFERIN

Bias Lighting and Ambient Light firmware designed for Firefly Luciferin











)====="; diff --git a/version b/version index a637acc71..d0c6c2d5b 100644 --- a/version +++ b/version @@ -1 +1 @@ -5.16.124 \ No newline at end of file +5.16.150 \ No newline at end of file From bfd1d531acdcb886855254b0e9206feeab222cbd Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 17 Dec 2024 14:44:58 +0100 Subject: [PATCH 11/13] new effects --- include/Version.h | 4 ++-- src/Globals.cpp | 16 ++++++++-------- version | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/Version.h b/include/Version.h index 87242c4ec..6dba3839d 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,9 +1,9 @@ // AUTO GENERATED FILE, DO NOT EDIT #ifndef VERSION - #define VERSION "5.16.150" + #define VERSION "5.16.152" #endif #ifndef BUILD_TIMESTAMP - #define BUILD_TIMESTAMP "2024-12-17 14:02:44.384645" + #define BUILD_TIMESTAMP "2024-12-17 14:38:58.822045" #endif \ No newline at end of file diff --git a/src/Globals.cpp b/src/Globals.cpp index 5af932524..c7d35dc54 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -315,21 +315,21 @@ const char *Globals::effectToString(Effect e) { case Effect::GlowWormWifi: return "GlowWormWifi"; case Effect::randomColors: - return "randomColor"; + return "Random colors"; case Effect::rainbowColors: - return "rainbowColors"; + return "Rainbow colors"; case Effect::meteor: - return "meteor"; + return "Meteor"; case Effect::colorWaterfall: - return "colorWaterfall"; + return "Color waterfall"; case Effect::randomMarquee: - return "randomMarquee"; + return "Random marquee"; case Effect::rainbowMarquee: - return "rainbowMarquee"; + return "Rainbow marquee"; case Effect::pulsing_rainbow: - return "pulsing_rainbow"; + return "Pulsing rainbow"; case Effect::christmas: - return "christmas"; + return "Christmas"; default: return "Solid"; } diff --git a/version b/version index d0c6c2d5b..a1d7fd1ec 100644 --- a/version +++ b/version @@ -1 +1 @@ -5.16.150 \ No newline at end of file +5.16.152 \ No newline at end of file From 81411dad2512b0d4c1bcf632824c909a43bd7aed Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Tue, 17 Dec 2024 16:24:21 +0100 Subject: [PATCH 12/13] new effects --- include/Version.h | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Version.h b/include/Version.h index 6dba3839d..f027cc67b 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,7 +1,7 @@ // AUTO GENERATED FILE, DO NOT EDIT #ifndef VERSION - #define VERSION "5.16.152" + #define VERSION "5.16.7" #endif #ifndef BUILD_TIMESTAMP #define BUILD_TIMESTAMP "2024-12-17 14:38:58.822045" diff --git a/version b/version index a1d7fd1ec..414a9e37f 100644 --- a/version +++ b/version @@ -1 +1 @@ -5.16.152 \ No newline at end of file +5.16.7 \ No newline at end of file From 9d6a575a51c1376f57dbad4965e69c478c3035f9 Mon Sep 17 00:00:00 2001 From: Davide Perini Date: Wed, 18 Dec 2024 22:54:26 +0100 Subject: [PATCH 13/13] release script --- release.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 release.sh diff --git a/release.sh b/release.sh new file mode 100644 index 000000000..a67b5c929 --- /dev/null +++ b/release.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +echo "Please enter the release tag, this will be used by the CI to create the release (ex: 2.17.10): " +read -p "-> " input_string +echo "" + +git pull; + +echo "" + +read -p "Do you want to create a new release on Git? (y/N): " answerOne + +if [[ "$answerOne" =~ ^[Yy]$ ]]; then + echo "Creating tag: $input_string" + git tag -a "$input_string" -m "v$input_string"; + echo "Pushing tags..." + git push origin --tags; + echo "GitHub Actions is building the project:" + echo "" + echo "https://github.com/sblantipodi/glow_worm_luciferin/actions" +else + echo "Skipping main release..." +fi \ No newline at end of file