From cb0452964e13a9a44d1e688f9f1f8275b15896b5 Mon Sep 17 00:00:00 2001 From: fishbone-git Date: Tue, 18 Feb 2020 21:28:46 +0100 Subject: [PATCH 01/22] bidirectional running lights effect --- wled00/FX.cpp | 18 ++++++++++++++++-- wled00/FX.h | 11 +++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index eb043522..bbc63cc4 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -426,13 +426,15 @@ uint16_t WS2812FX::mode_theater_chase_rainbow(void) { /* * Running lights effect with smooth sine transition base. */ -uint16_t WS2812FX::running_base(bool saw) { +uint16_t WS2812FX::running_base(bool saw, bool dual=false) { uint8_t x_scale = SEGMENT.intensity >> 2; uint32_t counter = (now * SEGMENT.speed) >> 9; for(uint16_t i = 0; i < SEGLEN; i++) { uint8_t s = 0; + uint8_t t = 0; uint8_t a = i*x_scale - counter; + uint8_t b = (SEGLEN-1-i)*x_scale - counter; if (saw) { if (a < 16) { @@ -442,12 +444,24 @@ uint16_t WS2812FX::running_base(bool saw) { } } s = sin8(a); - setPixelColor(i, color_blend(color_from_palette(i, true, PALETTE_SOLID_WRAP, 0), SEGCOLOR(1), s)); + t = sin8(b); + uint32_t ca = color_blend(color_from_palette(i, true, PALETTE_SOLID_WRAP, 0), SEGCOLOR(1), s); + uint32_t cb = color_blend(color_from_palette(i, true, PALETTE_SOLID_WRAP, 2), SEGCOLOR(1), t); + uint32_t cl = dual ? color_blend(ca, cb, 127) : ca; + setPixelColor(i, cl); } return FRAMETIME; } +/* + * Running lights in opposite directions. + */ +uint16_t WS2812FX::mode_running_dual(void) { + return running_base(false, true); +} + + /* * Running lights effect with smooth sine transition. */ diff --git a/wled00/FX.h b/wled00/FX.h index abfc11d3..1efbb59b 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -91,7 +91,7 @@ #define IS_REVERSE ((SEGMENT.options & REVERSE ) == REVERSE ) #define IS_SELECTED ((SEGMENT.options & SELECTED) == SELECTED ) -#define MODE_COUNT 101 +#define MODE_COUNT 102 #define FX_MODE_STATIC 0 #define FX_MODE_BLINK 1 @@ -194,6 +194,7 @@ #define FX_MODE_PERCENT 98 #define FX_MODE_RIPPLE_RAINBOW 99 #define FX_MODE_HEARTBEAT 100 +#define FX_MODE_RUNNING_DUAL 101 class WS2812FX { typedef uint16_t (WS2812FX::*mode_ptr)(void); @@ -383,6 +384,7 @@ class WS2812FX { _mode[FX_MODE_PERCENT] = &WS2812FX::mode_percent; _mode[FX_MODE_RIPPLE_RAINBOW] = &WS2812FX::mode_ripple_rainbow; _mode[FX_MODE_HEARTBEAT] = &WS2812FX::mode_heartbeat; + _mode[FX_MODE_RUNNING_DUAL] = &WS2812FX::mode_running_dual; _brightness = DEFAULT_BRIGHTNESS; currentPalette = CRGBPalette16(CRGB::Black); @@ -568,7 +570,8 @@ class WS2812FX { mode_plasma(void), mode_percent(void), mode_ripple_rainbow(void), - mode_heartbeat(void); + mode_heartbeat(void), + mode_running_dual(void); private: @@ -607,7 +610,7 @@ class WS2812FX { color_wipe(bool, bool), scan(bool), theater_chase(uint32_t, uint32_t, bool), - running_base(bool), + running_base(bool,bool), larson_scanner(bool), sinelon_base(bool,bool), dissolve(uint32_t), @@ -650,7 +653,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([ "Noise 1","Noise 2","Noise 3","Noise 4","Colortwinkles","Lake","Meteor","Meteor Smooth","Railway","Ripple", "Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle","Fireworks Starburst", "Fireworks 1D","Bouncing Balls","Sinelon","Sinelon Dual","Sinelon Rainbow","Popcorn","Drip","Plasma","Percent","Ripple Rainbow", -"Heartbeat" +"Heartbeat","Running Dual" ])====="; From 8755a9bcda652373d75ba6b27f2e6805dd8d1b1f Mon Sep 17 00:00:00 2001 From: cschwinne Date: Tue, 30 Mar 2021 02:04:02 +0200 Subject: [PATCH 02/22] 0.12.0 Beta 5 (fixes #1837) --- .travis.yml.old | 43 ------------------- CHANGELOG.md | 6 +++ package.json | 2 +- platformio.ini | 14 +++--- .../platformio_override.ini.sample | 2 +- wled00/cfg.cpp | 10 ++--- wled00/html_other.h | 2 +- wled00/html_settings.h | 2 +- wled00/wled.h | 6 +-- 9 files changed, 24 insertions(+), 63 deletions(-) delete mode 100644 .travis.yml.old diff --git a/.travis.yml.old b/.travis.yml.old deleted file mode 100644 index 16b4f2c1..00000000 --- a/.travis.yml.old +++ /dev/null @@ -1,43 +0,0 @@ -# Continuous Integration (CI) is the practice, in software -# engineering, of merging all developer working copies with a shared mainline -# several times a day < https://docs.platformio.org/page/ci/index.html > -# -# Documentation: -# -# * Travis CI Embedded Builds with PlatformIO -# < https://docs.travis-ci.com/user/integration/platformio/ > -# -# * PlatformIO integration with Travis CI -# < https://docs.platformio.org/page/ci/travis.html > -# -# * User Guide for `platformio ci` command -# < https://docs.platformio.org/page/userguide/cmd_ci.html > -# -# -# Please choose one of the following templates (proposed below) and uncomment -# it (remove "# " before each line) or use own configuration according to the -# Travis CI documentation (see above). -# -# * Test the Travis config here: -# < https://config.travis-ci.com/explore > -# - -language: python -python: - # - "2.7" - - "3.5" -os: linux -cache: - bundler: true - ccache: true - directories: - - "~/.platformio" - - "~/.buildcache" -env: - - PLATFORMIO_CI_SRC=wled00 -install: - - pip install -U platformio - - platformio update -script: - # - platformio ci --project-conf=./platformio.ini - - platformio run \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a2411cdb..3f6e2981 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ### Development versions between 0.11.1 and 0.12.0 releases +#### Build 2103300 + +- Version bump to 0.12.0-b5 "Hikari" +- Update to core espressif32@3.2 +- Fixed IR pin not configurable + #### Build 2103290 - Version bump to 0.12.0-b4 "Hikari" diff --git a/package.json b/package.json index a1bef2ef..66819538 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.12.0-b4", + "version": "0.12.0-b5", "description": "Tools for WLED project", "main": "tools/cdata.js", "directories": { diff --git a/platformio.ini b/platformio.ini index e5c6c161..ea5972ea 100644 --- a/platformio.ini +++ b/platformio.ini @@ -259,7 +259,7 @@ build_flags = ${common.build_flags_esp8266} -D LEDPIN=1 -D WLED_DISABLE_INFRARED [env:esp32dev] board = esp32dev -platform = espressif32@3.1.1 +platform = espressif32@3.2 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp32} lib_ignore = @@ -268,7 +268,7 @@ lib_ignore = [env:esp32_eth] board = esp32-poe -platform = espressif32@3.1.1 +platform = espressif32@3.2 upload_speed = 921600 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 @@ -387,7 +387,7 @@ build_flags = ${common.build_flags_esp8266} -D USE_WS2801 [env:custom32_LEDPIN_16] board = esp32dev -platform = espressif32@3.1.1 +platform = espressif32@3.2 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp32} -D LEDPIN=16 -D RLYPIN=19 lib_ignore = @@ -396,7 +396,7 @@ lib_ignore = [env:custom32_APA102] board = esp32dev -platform = espressif32@3.1.1 +platform = espressif32@3.2 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp32} -D USE_APA102 lib_ignore = @@ -405,7 +405,7 @@ lib_ignore = [env:custom32_TOUCHPIN_T0] board = esp32dev -platform = espressif32@3.1.1 +platform = espressif32@3.2 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp32} -D TOUCHPIN=T0 lib_ignore = @@ -414,7 +414,7 @@ lib_ignore = [env:wemos_shield_esp32] board = esp32dev -platform = espressif32@3.1.1 +platform = espressif32@3.2 upload_port = /dev/cu.SLAB_USBtoUART monitor_port = /dev/cu.SLAB_USBtoUART upload_speed = 460800 @@ -431,7 +431,7 @@ build_flags = ${common.build_flags_esp32} -D LEDPIN=27 -D BTNPIN=39 lib_ignore = ESPAsyncTCP ESPAsyncUDP -platform = espressif32@3.1.1 +platform = espressif32@3.2 [env:sp501e] board = esp_wroom_02 diff --git a/usermods/usermod_v2_rotary_encoder_ui/platformio_override.ini.sample b/usermods/usermod_v2_rotary_encoder_ui/platformio_override.ini.sample index 4b9fa955..cc39d65c 100644 --- a/usermods/usermod_v2_rotary_encoder_ui/platformio_override.ini.sample +++ b/usermods/usermod_v2_rotary_encoder_ui/platformio_override.ini.sample @@ -4,7 +4,7 @@ default_envs = d1_mini [env:esp32dev] board = esp32dev -platform = espressif32@3.1.1 +platform = espressif32@3.2 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags_esp32} diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 96f4bf42..435ef438 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -154,7 +154,7 @@ void deserializeConfig() { //int hw_btn_ins_0_type = hw_btn_ins_0["type"]; // 0 #ifndef WLED_DISABLE_INFRARED - int hw_ir_pin = hw["ir"]["pin"]; // 4 + int hw_ir_pin = hw["ir"]["pin"] | -1; // 4 if (pinManager.allocatePin(hw_ir_pin,false)) { irPin = hw_ir_pin; } else { @@ -488,11 +488,9 @@ void serializeConfig() { hw_btn_ins_0_macros.add(macroDoublePress); #ifndef WLED_DISABLE_INFRARED - if (irPin>=0) { - JsonObject hw_ir = hw.createNestedObject("ir"); - hw_ir["pin"] = irPin; - hw_ir[F("type")] = irEnabled; // the byte 'irEnabled' does contain the IR-Remote Type ( 0=disabled ) - } + JsonObject hw_ir = hw.createNestedObject("ir"); + hw_ir["pin"] = irPin; + hw_ir[F("type")] = irEnabled; // the byte 'irEnabled' does contain the IR-Remote Type ( 0=disabled ) #endif JsonObject hw_relay = hw.createNestedObject(F("relay")); diff --git a/wled00/html_other.h b/wled00/html_other.h index e8b6b6bf..2c515a1a 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.12.0-b4
Download the latest binary: Download the latest binary:

diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 91c48b4c..810d889d 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -375,7 +375,7 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form

Software Update


Enable ArduinoOTA:

About

WLED - version 0.12.0-b4


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

diff --git a/wled00/wled.h b/wled00/wled.h index 42e9cd2c..2fe5a792 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -3,12 +3,12 @@ /* Main sketch, global variable declarations @title WLED project sketch - @version 0.12.0-b4 + @version 0.12.0-b5 @author Christian Schwinne */ // version code in format yymmddb (b = daily build) -#define VERSION 2103290 +#define VERSION 2103300 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG @@ -168,7 +168,7 @@ #endif // Global Variable definitions -WLED_GLOBAL char versionString[] _INIT("0.12.0-b4"); +WLED_GLOBAL char versionString[] _INIT("0.12.0-b5"); #define WLED_CODENAME "Hikari" // AP and OTA default passwords (for maximum security change them!) From 8f9207745419947c31467ce5362889c8db9eb4e7 Mon Sep 17 00:00:00 2001 From: Bram Mittendorff Date: Tue, 30 Mar 2021 11:45:48 +0200 Subject: [PATCH 03/22] Updated readme.md Updated readme.md because currenly the DallasTemperature and Onewire are under `lib_deps`. --- usermods/Temperature/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usermods/Temperature/readme.md b/usermods/Temperature/readme.md index 5e26ba69..5b7f5b95 100644 --- a/usermods/Temperature/readme.md +++ b/usermods/Temperature/readme.md @@ -39,7 +39,7 @@ default_envs = d1_mini ... [common] ... -lib_deps_external = +lib_deps = ... #For use SSD1306 OLED display uncomment following U8g2@~2.27.3 @@ -55,4 +55,4 @@ lib_deps_external = * Changed to use async, non-blocking implementation * Do not report low temperatures that indicate an error to mqtt * Disable plugin if temperature sensor not detected -* Report the number of seconds until the first read in the info screen instead of sensor error \ No newline at end of file +* Report the number of seconds until the first read in the info screen instead of sensor error From fbe866198dc731c1fc25a33a338f4623bfbdd296 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Fri, 2 Apr 2021 16:52:53 +0200 Subject: [PATCH 04/22] Fixed iOS LED settings --- CHANGELOG.md | 7 +++++++ package.json | 2 +- wled00/data/settings_leds.htm | 10 ++++++---- wled00/html_other.h | 2 +- wled00/html_settings.h | 16 ++++++++-------- wled00/wled.h | 6 +++--- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6e2981..0ba8224e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## WLED changelog +### WLED release 0.12.0 + +#### Build 2103310 + +- Version bump to 0.12.0 "Hikari" +- Fixed LED settings submission in iOS app + ### Development versions between 0.11.1 and 0.12.0 releases #### Build 2103300 diff --git a/package.json b/package.json index 66819538..5b75307b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.12.0-b5", + "version": "0.12.0", "description": "Tools for WLED project", "main": "tools/cdata.js", "directories": { diff --git a/wled00/data/settings_leds.htm b/wled00/data/settings_leds.htm index 10a73f89..f17981e5 100644 --- a/wled00/data/settings_leds.htm +++ b/wled00/data/settings_leds.htm @@ -17,7 +17,8 @@ function bLimits(b,p,m) { maxB = b; maxM = m; maxPB = p; } - function trySubmit() { + function trySubmit(event) { + event.preventDefault(); var LCs = d.getElementsByTagName("input"); for (i=0; i 100) {var msg = "Too many LEDs for me to handle!"; if (maxM < 10000) msg += " Consider using an ESP32."; alert(msg); return;} + if (d.Sf.checkValidity()) d.Sf.submit(); //https://stackoverflow.com/q/37323914 if (d.Sf.reportValidity()) d.Sf.submit(); } function S(){GetV();setABL();} @@ -255,9 +257,9 @@ - +
-
+

LED & Hardware setup

Total LED count:
Recommended power supply for brightest white:
@@ -344,7 +346,7 @@

- + diff --git a/wled00/html_other.h b/wled00/html_other.h index 2c515a1a..802e59e4 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.12.0-b5
Download the latest binary: Download the latest binary:

diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 810d889d..11341d27 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -72,13 +72,13 @@ Do not enable if WiFi is working correctly, increases power consumption.
LED Settings