From eab132ed32149e2a55605531bf7ded7990b46d5d Mon Sep 17 00:00:00 2001 From: Tyler Walters Date: Mon, 6 Dec 2021 22:17:35 -0500 Subject: [PATCH 01/18] Improved speed and reduced memory usage for Blends effect color_blend() function only generates 256 colors from the palette before repeating. Improved the function to use either 256 max or the segment length if shorter. --- wled00/FX.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index d0767713b..c5a787236 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -3783,18 +3783,24 @@ uint16_t WS2812FX::mode_washing_machine(void) { Modified, originally by Mark Kriegsman https://gist.github.com/kriegsman/1f7ccbbfa492a73c015e */ uint16_t WS2812FX::mode_blends(void) { - uint16_t dataSize = sizeof(uint32_t) * SEGLEN; // max segment length of 56 pixels on 16 segment ESP8266 + uint16_t pixelLen = SEGLEN > UINT8_MAX ? UINT8_MAX : SEGLEN; + uint16_t dataSize = sizeof(uint32_t) * (pixelLen + 1); // max segment length of 56 pixels on 16 segment ESP8266 if (!SEGENV.allocateData(dataSize)) return mode_static(); //allocation failed uint32_t* pixels = reinterpret_cast(SEGENV.data); uint8_t blendSpeed = map(SEGMENT.intensity, 0, UINT8_MAX, 10, 128); - uint8_t shift = (now * ((SEGMENT.speed >> 3) +1)) >> 8; + uint8_t shift = (now * ((SEGMENT.speed >> 3) +1)) >> 8; - for (int i = 0; i < SEGLEN; i++) { + for (int i = 0; i < pixelLen; i++) { pixels[i] = color_blend(pixels[i], color_from_palette(shift + quadwave8((i + 1) * 16), false, PALETTE_SOLID_WRAP, 255), blendSpeed); - setPixelColor(i, pixels[i]); shift += 3; } + uint16_t offset = 0; + for (int i = 0; i < SEGLEN; i++) { + setPixelColor(i, pixels[offset++]); + if (offset > pixelLen) offset = 0; + } + return FRAMETIME; } From 9e6866c160a15e4fd22699819ad44a2f1b735a6e Mon Sep 17 00:00:00 2001 From: cschwinne Date: Wed, 8 Dec 2021 01:22:48 +0100 Subject: [PATCH 02/18] 0.13.0-b6 --- CHANGELOG.md | 5 +++++ package-lock.json | 2 +- package.json | 2 +- platformio.ini | 10 +++++++++- wled00/html_other.h | 2 +- wled00/html_settings.h | 2 +- wled00/improv.cpp | 2 +- wled00/wled.h | 4 ++-- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6751de2c2..e2ef83e61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ### Builds after release 0.12.0 +#### Build 2112080 + +- Version bump to 0.13.0-b6 "Toki" +- Added "ESP02" (ESP8266 with 2M of flash) to PIO/release binaries + #### Build 2112070 - Added new effect "Fairy", replacing "Police All" diff --git a/package-lock.json b/package-lock.json index cb50fcb57..6ed889044 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.13.0-b5", + "version": "0.13.0-b6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 65e38d833..8e00d8cf0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.13.0-b5", + "version": "0.13.0-b6", "description": "Tools for WLED project", "main": "tools/cdata.js", "directories": { diff --git a/platformio.ini b/platformio.ini index 371403303..faa6f162a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,7 +12,7 @@ ; default_envs = travis_esp8266, travis_esp32 # Release binaries -default_envs = nodemcuv2, esp01_1m_full, esp32dev, esp32_eth +default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth # Build everything ; default_envs = esp32dev, esp8285_4CH_MagicHome, esp8285_4CH_H801, codm-controller-0.6-rev2, codm-controller-0.6, esp32s2_saola, d1_mini_5CH_Shojo_PCB, d1_mini, sp501e, travis_esp8266, travis_esp32, nodemcuv2, esp32_eth, anavi_miracle_controller, esp07, esp01_1m_full, m5atom, h803wf, d1_mini_ota, heltec_wifi_kit_8, esp8285_5CH_H801, d1_mini_debug, wemos_shield_esp32, elekstube_ips @@ -20,6 +20,7 @@ default_envs = nodemcuv2, esp01_1m_full, esp32dev, esp32_eth # Single binaries (uncomment your board) ; default_envs = elekstube_ips ; default_envs = nodemcuv2 +; default_envs = esp8266_2m ; default_envs = esp01_1m_full ; default_envs = esp07 ; default_envs = d1_mini @@ -241,6 +242,13 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266 lib_deps = ${esp8266.lib_deps} +[env:esp8266_2m] +board = esp_wroom_02 +platform = ${common.platform_wled_default} +board_build.ldscript = ${common.ldscript_2m512k} +build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP02 +lib_deps = ${esp8266.lib_deps} + [env:esp01_1m_full] board = esp01_1m platform = ${common.platform_wled_default} diff --git a/wled00/html_other.h b/wled00/html_other.h index 1561b63dd..23ff3b77d 100644 --- a/wled00/html_other.h +++ b/wled00/html_other.h @@ -42,7 +42,7 @@ function B(){window.history.back()}function U(){document.getElementById("uf").st .bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none}

WLED Software Update

-Installed version: 0.13.0-b5
Download the latest binary: Download the latest binary:


Incorrect configuration may require a factory reset or re-flashing of your ESP.
For security reasons, passwords are not backed up.

About

WLED - version 0.13.0-b5


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

diff --git a/wled00/improv.cpp b/wled00/improv.cpp index 56ee9e0a0..5a30cc55d 100644 --- a/wled00/improv.cpp +++ b/wled00/improv.cpp @@ -189,7 +189,7 @@ void sendImprovInfoResponse() { out[11] = 4; //Firmware len ("WLED") out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D'; uint8_t lengthSum = 17; - uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.13.0-b5/%i"),VERSION); + uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.13.0-b6/%i"),VERSION); out[16] = vlen; lengthSum += vlen; uint8_t hlen = 7; #ifdef ESP8266 diff --git a/wled00/wled.h b/wled00/wled.h index 6dea609dc..8be68f59f 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -3,12 +3,12 @@ /* Main sketch, global variable declarations @title WLED project sketch - @version 0.13.0-b5 + @version 0.13.0-b6 @author Christian Schwinne */ // version code in format yymmddb (b = daily build) -#define VERSION 2112070 +#define VERSION 2112080 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG From 094bdb29b6b6872907c222c4cfe2d2b2842b3b23 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Wed, 8 Dec 2021 22:41:16 +0100 Subject: [PATCH 03/18] Fix for >10 buttons. --- wled00/data/settings_leds.htm | 4 ++-- wled00/data/settings_time.htm | 8 ++++---- wled00/html_settings.h | 4 ++-- wled00/set.cpp | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/wled00/data/settings_leds.htm b/wled00/data/settings_leds.htm index 34ccf90e1..86cdb510d 100644 --- a/wled00/data/settings_leds.htm +++ b/wled00/data/settings_leds.htm @@ -349,8 +349,8 @@ ${i+1}: } function addBtn(i,p,t) { var c = gId("btns").innerHTML; - var bt = "BT" + i; - var be = "BE" + i; + var bt = "BT" + String.fromCharCode((i<10?48:55)+i);; + var be = "BE" + String.fromCharCode((i<10?48:55)+i);; c += `Button ${i} GPIO: `; c += ` `; + td.innerHTML = ``; td = tr.insertCell(2); - td.innerHTML = ``; + td.innerHTML = ``; td = tr.insertCell(3); - td.innerHTML = ``; + td.innerHTML = ``; } function GetV() { diff --git a/wled00/html_settings.h b/wled00/html_settings.h index fb6ad75a1..c3e7d1daf 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -74,7 +74,7 @@ onclick="B()">Back // Autogenerated from wled00/data/settings_leds.htm, do not edit!! const char PAGE_settings_leds[] PROGMEM = R"=====(LED Settings