From 6d278994ec1a4421580883f79701e96b9e58a67f Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Fri, 29 Mar 2024 20:05:56 +0100 Subject: [PATCH 01/11] WLED 0.14.3 release - Fix for transition 0 (#3854, #3832, #3720) - copyright year update - updated AsyncWebServer to v2.2.0 --- CHANGELOG.md | 4 +++ package-lock.json | 4 +-- package.json | 2 +- platformio.ini | 7 ++-- wled00/data/settings_sec.htm | 2 +- wled00/html_other.h | 66 ++++++++++++++++++------------------ wled00/html_settings.h | 30 ++++++++-------- wled00/improv.cpp | 2 +- wled00/led.cpp | 2 ++ wled00/wled.h | 2 +- 10 files changed, 63 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8095a15d24..1cff856a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## WLED changelog +#### Build 2403290 +- WLED 0.14.3 release +- Fix for transition 0 (#3854, #3832, #3720) + #### Build 2403170 - WLED 0.14.2 release diff --git a/package-lock.json b/package-lock.json index 9bf4449ebc..a7330143f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wled", - "version": "0.14.2", + "version": "0.14.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wled", - "version": "0.14.2", + "version": "0.14.3", "license": "ISC", "dependencies": { "clean-css": "^4.2.3", diff --git a/package.json b/package.json index 8781cd6c82..3bd73b76db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.14.2", + "version": "0.14.3", "description": "Tools for WLED project", "main": "tools/cdata.js", "directories": { diff --git a/platformio.ini b/platformio.ini index 914ed05b35..0adc18cf28 100644 --- a/platformio.ini +++ b/platformio.ini @@ -63,7 +63,7 @@ arduino_core_2_7_4 = espressif8266@2.6.2 arduino_core_3_0_0 = espressif8266@3.0.0 arduino_core_3_2_0 = espressif8266@3.2.0 arduino_core_4_1_0 = espressif8266@4.1.0 -arduino_core_3_1_2 = espressif8266@4.2.0 +arduino_core_3_1_2 = espressif8266@4.2.1 # Development platforms arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop @@ -73,8 +73,7 @@ arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/ platform_wled_default = ${common.arduino_core_3_1_2} # We use 2.7.4.7 for all, includes PWM flicker fix and Wstring optimization #platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7 -platform_packages = platformio/framework-arduinoespressif8266 - platformio/toolchain-xtensa @ ~2.100300.220621 #2.40802.200502 +platform_packages = platformio/toolchain-xtensa @ ~2.100300.220621 #2.40802.200502 platformio/tool-esptool #@ ~1.413.0 platformio/tool-esptoolpy #@ ~1.30000.0 @@ -181,7 +180,7 @@ lib_deps = fastled/FastLED @ 3.6.0 IRremoteESP8266 @ 2.8.2 makuna/NeoPixelBus @ 2.7.5 - https://github.com/Aircoookie/ESPAsyncWebServer.git @ ^2.1.0 + https://github.com/Aircoookie/ESPAsyncWebServer.git @ ^2.2.0 #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line #TFT_eSPI #For compatible OLED display uncomment following diff --git a/wled00/data/settings_sec.htm b/wled00/data/settings_sec.htm index 0d9ec256a8..2cb4a264a8 100644 --- a/wled00/data/settings_sec.htm +++ b/wled00/data/settings_sec.htm @@ -134,7 +134,7 @@

About

WLED version ##VERSION##

Contributors, dependencies and special thanks
A huge thank you to everyone who helped me create WLED!

- (c) 2016-2023 Christian Schwinne
+ (c) 2016-2024 Christian Schwinne
Licensed under the MIT license

Server message: Response error!
diff --git a/wled00/html_other.h b/wled00/html_other.h index 2799fcdf30..3f94026157 100644 --- a/wled00/html_other.h +++ b/wled00/html_other.h @@ -43,45 +43,45 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()====="; // Autogenerated from wled00/data/update.htm, do not edit!! const uint16_t PAGE_update_length = 613; const uint8_t PAGE_update[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0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3, 0x65, + 0x29, 0x89, 0x6f, 0x5a, 0x77, 0x8a, 0xdc, 0x94, 0xbf, 0xe9, 0xc7, 0xfe, 0x09, 0x81, 0xae, 0xc2, + 0xc6, 0xee, 0x03, 0x00, 0x00 }; diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 62d3404dca..a1bd61e9ea 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -1753,21 +1753,21 @@ const uint8_t PAGE_settings_sec[] PROGMEM = { 0xcb, 0xf1, 0x18, 0xb7, 0xdc, 0x36, 0x49, 0x9a, 0x44, 0x68, 0x3f, 0x23, 0xa1, 0xe0, 0x66, 0xd5, 0x38, 0xc4, 0xd5, 0xbd, 0x77, 0x2c, 0x75, 0xa2, 0x94, 0x9a, 0x49, 0xd1, 0xa3, 0x1e, 0xbc, 0x87, 0x3a, 0x1d, 0xeb, 0x29, 0x7d, 0xee, 0xfa, 0x38, 0xce, 0x51, 0x22, 0xf9, 0x80, 0x86, 0x29, 0x08, - 0x3a, 0xec, 0x4e, 0x68, 0xa2, 0x19, 0xb6, 0x1b, 0xee, 0x3d, 0x0f, 0xf7, 0x57, 0x44, 0xf5, 0x33, - 0xe2, 0x17, 0x72, 0x26, 0x7b, 0xee, 0xce, 0x46, 0xed, 0xab, 0xd2, 0x66, 0x07, 0x54, 0xb8, 0x93, - 0x68, 0x91, 0x4a, 0x8a, 0xd0, 0xce, 0xfd, 0xc3, 0x37, 0x97, 0xa2, 0x54, 0x0b, 0xba, 0x7d, 0x82, - 0xfc, 0xa4, 0xa8, 0x39, 0xd4, 0x94, 0x22, 0x91, 0x20, 0x1c, 0x8b, 0x72, 0x30, 0x5b, 0xe5, 0x6d, - 0xe7, 0x98, 0x65, 0x15, 0xaa, 0x85, 0x1b, 0x75, 0x05, 0x11, 0xbc, 0x8f, 0x3b, 0x97, 0x5e, 0xaa, - 0x42, 0xa0, 0x50, 0x29, 0x46, 0x7d, 0x1e, 0xe0, 0x02, 0x33, 0xd6, 0xdf,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0xec, 0xb7, 0x4d, 0x6c, 0xe7, 0xa7, 0xba, 0xd8, 0x1e, + 0x95, 0x1a, 0xfc, 0x50, 0xf3, 0x4e, 0x9d, 0x3c, 0x7d, 0xd9, 0xfd, 0x2f, 0x9b, 0x42, 0x3b, 0x5f, 0xe9, 0x15, 0x00, 0x00 }; diff --git a/wled00/improv.cpp b/wled00/improv.cpp index 2267c35917..d7d9ad05d7 100644 --- a/wled00/improv.cpp +++ b/wled00/improv.cpp @@ -210,7 +210,7 @@ void sendImprovInfoResponse() { //Use serverDescription if it has been changed from the default "WLED", else mDNS name bool useMdnsName = (strcmp(serverDescription, "WLED") == 0 && strlen(cmDNS) > 0); char vString[20]; - sprintf_P(vString, PSTR("0.14.2/%i"), VERSION); + sprintf_P(vString, PSTR("0.14.3/%i"), VERSION); const char *str[4] = {"WLED", vString, bString, useMdnsName ? cmDNS : serverDescription}; sendImprovRPCResult(ImprovRPCType::Request_Info, 4, str); diff --git a/wled00/led.cpp b/wled00/led.cpp index e668f33407..efaab27066 100644 --- a/wled00/led.cpp +++ b/wled00/led.cpp @@ -137,6 +137,8 @@ void stateUpdated(byte callMode) { if (strip.getTransition() == 0) { jsonTransitionOnce = false; transitionActive = false; + applyFinalBri(); + strip.trigger(); return; } diff --git a/wled00/wled.h b/wled00/wled.h index 9f6ba88fdf..ba38c5c796 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2403170 +#define VERSION 2403290 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG From 02405b4856d75a0cd29bf8ff5ba9239562ec8072 Mon Sep 17 00:00:00 2001 From: Woody Date: Wed, 3 Apr 2024 12:05:15 +0200 Subject: [PATCH 02/11] Create stale.yml --- .github/workflows/stale.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..4d531fd519 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 12 * * *' + workflow_dispatch: + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: 120 + days-before-close: 7 + exempt-issue-labels: 'pinned,keep,enhancement,confirmed' + exempt-pr-labels: 'pinned,keep,enhancement,confirmed' + stale-issue-message: > + Hey! This issue has been open for quite some time without any new comments now. + It will be closed automatically in a week if no further activity occurs. + + Thank you for using WLED! ✨ + stale-pr-message: > + Hey! This pull request has been open for quite some time without any new comments now. + It will be closed automatically in a week if no further activity occurs. + + Thank you for using WLED! ✨ + debug-only: true From bff6697690cd6a3de72f183403949e75644a3e00 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Mon, 1 Apr 2024 11:25:31 -0400 Subject: [PATCH 03/11] Update to AsyncWebServer v2.2.1 --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 0adc18cf28..cbe13c0dd8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -180,7 +180,7 @@ lib_deps = fastled/FastLED @ 3.6.0 IRremoteESP8266 @ 2.8.2 makuna/NeoPixelBus @ 2.7.5 - https://github.com/Aircoookie/ESPAsyncWebServer.git @ ^2.2.0 + https://github.com/Aircoookie/ESPAsyncWebServer.git @ 2.2.1 #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line #TFT_eSPI #For compatible OLED display uncomment following From 00f5471270757e435753d7bbce46870ba1144cca Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Thu, 4 Apr 2024 21:59:41 +0200 Subject: [PATCH 04/11] Build bump, changelog udate --- CHANGELOG.md | 3 ++- wled00/wled.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cff856a4b..f1fe5cbdd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ ## WLED changelog -#### Build 2403290 +#### Build 2404040 - WLED 0.14.3 release - Fix for transition 0 (#3854, #3832, #3720) +- Fix for #3855 via #3873 (by @willmmiles) #### Build 2403170 - WLED 0.14.2 release diff --git a/wled00/wled.h b/wled00/wled.h index ba38c5c796..5834025c69 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -3,12 +3,12 @@ /* Main sketch, global variable declarations @title WLED project sketch - @version 0.14.2 + @version 0.14.3 @author Christian Schwinne */ // version code in format yymmddb (b = daily build) -#define VERSION 2403290 +#define VERSION 2404040 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG From a418cd2a2a5afd4bedbafca15239d510797c46fa Mon Sep 17 00:00:00 2001 From: Woody Date: Sat, 13 Apr 2024 19:37:49 +0200 Subject: [PATCH 05/11] Activate stale (#3898) * Update stale.yml Update pr text Schedule action 3 times a day * Delete old .github/stale.yml * Set exempt-all-milestones to true in stale.yml --- .github/stale.yml | 20 -------------------- .github/workflows/stale.yml | 6 +++--- 2 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 811db619ae..0000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 120 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - keep - - enhancement - - confirmed -# Label to use when marking an issue as stale -staleLabel: stale -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - Hey! This issue has been open for quite some time without any new comments now. - It will be closed automatically in a week if no further activity occurs. - - Thank you for using WLED! -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4d531fd519..aaad16a44c 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,7 +1,7 @@ name: 'Close stale issues and PRs' on: schedule: - - cron: '0 12 * * *' + - cron: '0 6,12,18 * * *' workflow_dispatch: jobs: @@ -14,6 +14,7 @@ jobs: days-before-close: 7 exempt-issue-labels: 'pinned,keep,enhancement,confirmed' exempt-pr-labels: 'pinned,keep,enhancement,confirmed' + exempt-all-milestones: true stale-issue-message: > Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. @@ -23,5 +24,4 @@ jobs: Hey! This pull request has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. - Thank you for using WLED! ✨ - debug-only: true + Thank you for contributing to WLED! ❤️ From d2b4d2531752ea7548cc9ba1a4e35915f0213b74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 19:38:03 +0200 Subject: [PATCH 06/11] Bump idna from 3.4 to 3.7 (#3895) Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8b55606dcb..c56efad498 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ h11==0.14.0 # via # uvicorn # wsproto -idna==3.4 +idna==3.7 # via # anyio # requests @@ -50,6 +50,8 @@ starlette==0.23.1 # via platformio tabulate==0.9.0 # via platformio +typing-extensions==4.11.0 + # via starlette urllib3==1.26.18 # via requests uvicorn==0.20.0 From cd928bc586cedf5bc5f4ed418c2ce743efc29523 Mon Sep 17 00:00:00 2001 From: Woody Date: Sun, 14 Apr 2024 13:14:03 +0200 Subject: [PATCH 07/11] Increase operations-per-run in stale.yml Because of this we don't need to run this action 3 times a day --- .github/workflows/stale.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index aaad16a44c..58a0b18d87 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,7 +1,7 @@ name: 'Close stale issues and PRs' on: schedule: - - cron: '0 6,12,18 * * *' + - cron: '0 12 * * *' workflow_dispatch: jobs: @@ -15,6 +15,7 @@ jobs: exempt-issue-labels: 'pinned,keep,enhancement,confirmed' exempt-pr-labels: 'pinned,keep,enhancement,confirmed' exempt-all-milestones: true + operations-per-run: 150 stale-issue-message: > Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. From b2e68db380326804d545b7bc71233edf8c041b35 Mon Sep 17 00:00:00 2001 From: Woody Date: Mon, 15 Apr 2024 22:55:38 +0200 Subject: [PATCH 08/11] Increase operations-per-run in stale.yml again --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 58a0b18d87..5d62571e1e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: exempt-issue-labels: 'pinned,keep,enhancement,confirmed' exempt-pr-labels: 'pinned,keep,enhancement,confirmed' exempt-all-milestones: true - operations-per-run: 150 + operations-per-run: 1000 stale-issue-message: > Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. From 6272969983c35e824622cf7d7515165eeff2e02f Mon Sep 17 00:00:00 2001 From: Woody Date: Tue, 16 Apr 2024 15:07:12 +0200 Subject: [PATCH 09/11] Set stale-pr-label & stale-issue-label to 'stale' in stale.yml Hopefully this fixes the error messages that were thrown the last time the action was executed --- .github/workflows/stale.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5d62571e1e..1f2557160c 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,6 +12,8 @@ jobs: with: days-before-stale: 120 days-before-close: 7 + stale-issue-label: 'stale' + stale-pr-label: 'stale' exempt-issue-labels: 'pinned,keep,enhancement,confirmed' exempt-pr-labels: 'pinned,keep,enhancement,confirmed' exempt-all-milestones: true From ecc9443677e1c69291138e8bf8f54d524614a144 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 11 May 2024 14:45:42 +0200 Subject: [PATCH 10/11] (0_14 branch only) adding compatibility for building with upstream arduinoFFT 2.xx support compilation with new arduinoFFT versions 2.x --- usermods/audioreactive/audio_reactive.h | 18 +++++++++++++----- usermods/audioreactive/readme.md | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index fec0525ec7..7169539570 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -177,9 +177,6 @@ constexpr uint16_t samplesFFT_2 = 256; // meaningfull part of FFT resul // These are the input and output vectors. Input vectors receive computed results from FFT. static float vReal[samplesFFT] = {0.0f}; // FFT sample inputs / freq output - these are our raw result bins static float vImag[samplesFFT] = {0.0f}; // imaginary parts -#ifdef UM_AUDIOREACTIVE_USE_NEW_FFT -static float windowWeighingFactors[samplesFFT] = {0.0f}; -#endif // Create FFT object #ifdef UM_AUDIOREACTIVE_USE_NEW_FFT @@ -198,9 +195,15 @@ static float windowWeighingFactors[samplesFFT] = {0.0f}; #include #ifdef UM_AUDIOREACTIVE_USE_NEW_FFT -static ArduinoFFT FFT = ArduinoFFT( vReal, vImag, samplesFFT, SAMPLE_RATE, windowWeighingFactors); +#if defined(FFT_LIB_REV) && FFT_LIB_REV > 0x19 + // arduinoFFT 2.x has a slightly different API + static ArduinoFFT FFT = ArduinoFFT( vReal, vImag, samplesFFT, SAMPLE_RATE, true); +#else + static float windowWeighingFactors[samplesFFT] = {0.0f}; // cache for FFT windowing factors + static ArduinoFFT FFT = ArduinoFFT( vReal, vImag, samplesFFT, SAMPLE_RATE, windowWeighingFactors); +#endif #else -static arduinoFFT FFT = arduinoFFT(vReal, vImag, samplesFFT, SAMPLE_RATE); + static arduinoFFT FFT = arduinoFFT(vReal, vImag, samplesFFT, SAMPLE_RATE); #endif // Helper functions @@ -300,7 +303,12 @@ void FFTcode(void * parameter) #endif #ifdef UM_AUDIOREACTIVE_USE_NEW_FFT + #if defined(FFT_LIB_REV) && FFT_LIB_REV > 0x19 + // arduinoFFT 2.x has a slightly different API + FFT.majorPeak(&FFT_MajorPeak, &FFT_Magnitude); // let the effects know which freq was most dominant + #else FFT.majorPeak(FFT_MajorPeak, FFT_Magnitude); // let the effects know which freq was most dominant + #endif #else FFT.MajorPeak(&FFT_MajorPeak, &FFT_Magnitude); // let the effects know which freq was most dominant #endif diff --git a/usermods/audioreactive/readme.md b/usermods/audioreactive/readme.md index 47804b611f..8959021ba7 100644 --- a/usermods/audioreactive/readme.md +++ b/usermods/audioreactive/readme.md @@ -38,7 +38,7 @@ Alternatively, you can use the latest arduinoFFT development version. ArduinoFFT `develop` library is slightly more accurate, and slightly faster than our customised library, however also needs additional 2kB RAM. * `build_flags` = `-D USERMOD_AUDIOREACTIVE` `-D UM_AUDIOREACTIVE_USE_NEW_FFT` -* `lib_deps`= `https://github.com/kosme/arduinoFFT#develop @ 1.9.2` +* `lib_deps`= `https://github.com/kosme/arduinoFFT#419d7b0` ## Configuration From 2aec21a6d02247389b88a19791e3b6e69a9177f9 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Wed, 15 May 2024 15:34:53 +0200 Subject: [PATCH 11/11] Palette loading optimisation - fixes #3978 - FX: Firenoise can use selected palette --- platformio_override.ini.sample | 65 ---------------------------------- wled00/FX.cpp | 20 +++++------ wled00/FX.h | 8 ++--- wled00/FX_fcn.cpp | 28 +++++++-------- 4 files changed, 26 insertions(+), 95 deletions(-) delete mode 100644 platformio_override.ini.sample diff --git a/platformio_override.ini.sample b/platformio_override.ini.sample deleted file mode 100644 index d6ea5d9649..0000000000 --- a/platformio_override.ini.sample +++ /dev/null @@ -1,65 +0,0 @@ -# Example PlatformIO Project Configuration Override -# ------------------------------------------------------------------------------ -# Copy to platformio_override.ini to activate overrides -# ------------------------------------------------------------------------------ -# Please visit documentation: https://docs.platformio.org/page/projectconf.html - -[platformio] -default_envs = WLED_tasmota_1M - -[env:WLED_tasmota_1M] -board = esp01_1m -platform = ${common.platform_wled_default} -platform_packages = ${common.platform_packages} -board_build.ldscript = ${common.ldscript_1m128k} -lib_deps = ${esp8266.lib_deps} -build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags_esp8266} -; ********************************************************************* -; *** Use custom settings from file my_config.h - -DWLED_USE_MY_CONFIG -; ********************************************************************* -; -; -; *** To use the below defines/overrides, copy and paste each onto it's own line just below build_flags in the section above. -; -; disable specific features -; -D WLED_DISABLE_OTA -; -D WLED_DISABLE_ALEXA -; -D WLED_DISABLE_HUESYNC -; -D WLED_DISABLE_INFRARED -; -D WLED_DISABLE_WEBSOCKETS -; PIN defines - uncomment and change, if needed: -; -D LEDPIN=2 -; -D BTNPIN=0 -; -D TOUCHPIN=T0 -; -D IRPIN=4 -; -D RLYPIN=12 -; -D RLYMDE=1 -; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support -; -D USE_APA102 -; -D USE_WS2801 -; -D USE_LPD8806 -; PIN defines for 2 wire LEDs - -D CLKPIN=0 - -D DATAPIN=2 -; to drive analog LED strips (aka 5050) hardware configuration is no longer necessary -; configure the settings in the UI as follows (hard): -; for the Magic Home LED Controller use PWM pins 5,12,13,15 -; for the H801 controller use PINs 15,13,12,14 (W2 = 04) -; for the BW-LT11 controller use PINs 12,4,14,5 -; -; set the name of the module - make sure there is a quote-backslash-quote before the name and a backslash-quote-quote after the name -; -D SERVERNAME="\"WLED\"" -; -; set the number of LEDs -; -D DEFAULT_LED_COUNT=30 -; -; set milliampere limit when using ESP pin to power leds -; -D ABL_MILLIAMPS_DEFAULT=850 -; -; enable IR by setting remote type -; -D IRTYPE=0 ;0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote -; -; set default color order of your led strip -; -D DEFAULT_LED_COLOR_ORDER=COL_ORDER_GRB diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 3f720385f2..cb8813c930 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -4863,25 +4863,25 @@ uint16_t mode_2Dfirenoise(void) { // firenoise2d. By Andrew Tuline SEGMENT.fill(BLACK); } - uint16_t xscale = SEGMENT.intensity*4; - uint32_t yscale = SEGMENT.speed*8; - uint8_t indexx = 0; + unsigned xscale = SEGMENT.intensity*4; + unsigned yscale = SEGMENT.speed*8; + unsigned indexx = 0; - SEGPALETTE = CRGBPalette16( CRGB(0,0,0), CRGB(0,0,0), CRGB(0,0,0), CRGB(0,0,0), - CRGB::Red, CRGB::Red, CRGB::Red, CRGB::DarkOrange, - CRGB::DarkOrange,CRGB::DarkOrange, CRGB::Orange, CRGB::Orange, - CRGB::Yellow, CRGB::Orange, CRGB::Yellow, CRGB::Yellow); + CRGBPalette16 pal = SEGMENT.check1 ? SEGPALETTE : CRGBPalette16(CRGB::Black, CRGB::Black, CRGB::Black, CRGB::Black, + CRGB::Red, CRGB::Red, CRGB::Red, CRGB::DarkOrange, + CRGB::DarkOrange,CRGB::DarkOrange, CRGB::Orange, CRGB::Orange, + CRGB::Yellow, CRGB::Orange, CRGB::Yellow, CRGB::Yellow); for (int j=0; j < cols; j++) { for (int i=0; i < rows; i++) { - indexx = inoise8(j*yscale*rows/255, i*xscale+millis()/4); // We're moving along our Perlin map. - SEGMENT.setPixelColorXY(j, i, ColorFromPalette(SEGPALETTE, min(i*(indexx)>>4, 255), i*255/cols, LINEARBLEND)); // With that value, look up the 8 bit colour palette value and assign it to the current LED. + indexx = inoise8(j*yscale*rows/255, i*xscale+strip.now/4); // We're moving along our Perlin map. + SEGMENT.setPixelColorXY(j, i, ColorFromPalette(pal, min(i*(indexx)>>4, 255U), i*255/cols, LINEARBLEND)); // With that value, look up the 8 bit colour palette value and assign it to the current LED. } // for i } // for j return FRAMETIME; } // mode_2Dfirenoise() -static const char _data_FX_MODE_2DFIRENOISE[] PROGMEM = "Firenoise@X scale,Y scale;;!;2"; +static const char _data_FX_MODE_2DFIRENOISE[] PROGMEM = "Firenoise@X scale,Y scale,,,,Palette;;!;2;pal=66"; ////////////////////////////// diff --git a/wled00/FX.h b/wled00/FX.h index 0d679ba649..167ed8f0f0 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -91,7 +91,7 @@ //#define SEGCOLOR(x) strip._segments[strip.getCurrSegmentId()].currentColor(x, strip._segments[strip.getCurrSegmentId()].colors[x]) //#define SEGLEN strip._segments[strip.getCurrSegmentId()].virtualLength() #define SEGCOLOR(x) strip.segColor(x) /* saves us a few kbytes of code */ -#define SEGPALETTE strip._currentPalette +#define SEGPALETTE Segment::getCurrentPalette() #define SEGLEN strip._virtualSegmentLength /* saves us a few kbytes of code */ #define SPEED_FORMULA_L (5U + (50U*(255U - SEGMENT.speed))/SEGLEN) @@ -414,6 +414,7 @@ typedef struct Segment { static uint16_t _usedSegmentData; // perhaps this should be per segment, not static + static CRGBPalette16 _currentPalette; // palette used for current effect (includes transition, used in color_from_palette()) static CRGBPalette16 _randomPalette; // actual random palette static CRGBPalette16 _newRandomPalette; // target random palette static unsigned long _lastPaletteChange; // last random palette change time in millis() @@ -530,6 +531,7 @@ typedef struct Segment { static void modeBlend(bool blend) { _modeBlend = blend; } #endif static void handleRandomPalette(); + inline static const CRGBPalette16 &getCurrentPalette(void) { return Segment::_currentPalette; } void setUp(uint16_t i1, uint16_t i2, uint8_t grp=1, uint8_t spc=0, uint16_t ofs=UINT16_MAX, uint16_t i1Y=0, uint16_t i2Y=1, uint8_t segId = 255); bool setColor(uint8_t slot, uint32_t c); //returns true if changed @@ -567,7 +569,7 @@ typedef struct Segment { uint8_t currentMode(void); uint32_t currentColor(uint8_t slot); CRGBPalette16 &loadPalette(CRGBPalette16 &tgt, uint8_t pal); - CRGBPalette16 ¤tPalette(CRGBPalette16 &tgt, uint8_t paletteID); + void setCurrentPalette(void); // 1D strip uint16_t virtualLength(void) const; @@ -693,7 +695,6 @@ class WS2812FX { // 96 bytes panels(1), #endif // semi-private (just obscured) used in effect functions through macros - _currentPalette(CRGBPalette16(CRGB::Black)), _colors_t{0,0,0}, _virtualSegmentLength(0), // true private variables @@ -888,7 +889,6 @@ class WS2812FX { // 96 bytes // end 2D support void loadCustomPalettes(void); // loads custom palettes from JSON - CRGBPalette16 _currentPalette; // palette used for current effect (includes transition) std::vector customPalettes; // TODO: move custom palettes out of WS2812FX class // using public variables to reduce code size increase due to inline function getSegment() (with bounds checking) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index f9cf3e1e73..10847ef572 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -77,6 +77,7 @@ uint16_t Segment::_usedSegmentData = 0U; // amount of RAM all segments use for t uint16_t Segment::maxWidth = DEFAULT_LED_COUNT; uint16_t Segment::maxHeight = 1; +CRGBPalette16 Segment::_currentPalette = CRGBPalette16(CRGB::Black); CRGBPalette16 Segment::_randomPalette = CRGBPalette16(DEFAULT_COLOR); CRGBPalette16 Segment::_newRandomPalette = CRGBPalette16(DEFAULT_COLOR); unsigned long Segment::_lastPaletteChange = 0; // perhaps it should be per segment @@ -201,7 +202,7 @@ void Segment::resetIfRequired() { CRGBPalette16 &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) { if (pal < 245 && pal > GRADIENT_PALETTE_COUNT+13) pal = 0; - if (pal > 245 && (strip.customPalettes.size() == 0 || 255U-pal > strip.customPalettes.size()-1)) pal = 0; + if (pal > 245 && (strip.customPalettes.size() == 0 || 255U-pal > strip.customPalettes.size()-1)) pal = 0; // TODO remove strip dependency by moving customPalettes out of strip //default palette. Differs depending on effect if (pal == 0) switch (mode) { case FX_MODE_FIRE_2012 : pal = 35; break; // heat palette @@ -343,8 +344,8 @@ void Segment::handleTransition() { // transition progression between 0-65535 uint16_t Segment::progress() { if (isInTransition()) { - unsigned long timeNow = millis(); - if (_t->_dur > 0 && timeNow - _t->_start < _t->_dur) return (timeNow - _t->_start) * 0xFFFFU / _t->_dur; + unsigned diff = millis() - _t->_start; + if (_t->_dur > 0 && diff < _t->_dur) return diff * 0xFFFFU / _t->_dur; } return 0xFFFFU; } @@ -448,18 +449,17 @@ uint32_t Segment::currentColor(uint8_t slot) { #endif } -CRGBPalette16 &Segment::currentPalette(CRGBPalette16 &targetPalette, uint8_t pal) { - loadPalette(targetPalette, pal); - uint16_t prog = progress(); +void Segment::setCurrentPalette() { + loadPalette(_currentPalette, palette); + unsigned prog = progress(); if (strip.paletteFade && prog < 0xFFFFU) { // blend palettes // there are about 255 blend passes of 48 "blends" to completely blend two palettes (in _dur time) // minimum blend time is 100ms maximum is 65535ms - uint16_t noOfBlends = ((255U * prog) / 0xFFFFU) - _t->_prevPaletteBlends; - for (int i=0; i_prevPaletteBlends++) nblendPaletteTowardPalette(_t->_palT, targetPalette, 48); - targetPalette = _t->_palT; // copy transitioning/temporary palette + unsigned noOfBlends = ((255U * prog) / 0xFFFFU) - _t->_prevPaletteBlends; + for (unsigned i = 0; i < noOfBlends; i++, _t->_prevPaletteBlends++) nblendPaletteTowardPalette(_t->_palT, _currentPalette, 48); + _currentPalette = _t->_palT; // copy transitioning/temporary palette } - return targetPalette; } // relies on WS2812FX::service() to call it max every 8ms or more (MIN_SHOW_DELAY) @@ -1078,11 +1078,7 @@ uint32_t Segment::color_from_palette(uint16_t i, bool mapping, bool wrap, uint8_ uint8_t paletteIndex = i; if (mapping && virtualLength() > 1) paletteIndex = (i*255)/(virtualLength() -1); if (!wrap && strip.paletteBlend != 3) paletteIndex = scale8(paletteIndex, 240); //cut off blend at palette "end" - CRGBPalette16 curPal; - curPal = currentPalette(curPal, palette); - //if (isInTransition()) curPal = _t->_palT; - //else loadPalette(curPal, palette); - CRGB fastled_col = ColorFromPalette(curPal, paletteIndex, pbri, (strip.paletteBlend == 3)? NOBLEND:LINEARBLEND); // NOTE: paletteBlend should be global + CRGB fastled_col = ColorFromPalette(_currentPalette, paletteIndex, pbri, (strip.paletteBlend == 3)? NOBLEND:LINEARBLEND); // NOTE: paletteBlend should be global return RGBW32(fastled_col.r, fastled_col.g, fastled_col.b, 0); } @@ -1187,7 +1183,7 @@ void WS2812FX::service() { _colors_t[0] = seg.currentColor(0); _colors_t[1] = seg.currentColor(1); _colors_t[2] = seg.currentColor(2); - seg.currentPalette(_currentPalette, seg.palette); // we need to pass reference + seg.setCurrentPalette(); // load actual palette if (!cctFromRgb || correctWB) busses.setSegmentCCT(seg.currentBri(true), correctWB); for (int c = 0; c < NUM_COLORS; c++) _colors_t[c] = gamma32(_colors_t[c]);