From c53647cd1809076d61b7eab65914b8fd1e2ce8d8 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Mon, 14 Dec 2020 23:32:57 +0100 Subject: [PATCH] Added Preset ID quick display option --- CHANGELOG.md | 7 +- wled00/FX_fcn.cpp | 8 +- wled00/NpbWrapper.h | 2 +- wled00/data/index.htm | 12 +- wled00/data/settings_sync.htm | 2 +- wled00/data/settings_ui.htm | 6 +- wled00/html_settings.h | 17 +- wled00/html_ui.h | 3218 +++++++++++++++++---------------- wled00/led.cpp | 12 + wled00/wled.h | 2 +- 10 files changed, 1655 insertions(+), 1631 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1419a14f6..e779b2c08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,16 @@ ### Development versions after 0.11.0 release +#### Build 2012140 + +- Added Preset ID quick display option (PR #1462) +- Fixed LEDs not turning on when using gamma correct brightness and LEDPIN 2 (default) +- Fixed notifier applying main segment to selected segments on notification with FX/Col disabled + #### Build 2012130 - Fixed RGBW mode not saved between reboots (fixes #1457) - Added brightness scaling in palette function for default (PR #1484) -- #### Build 2012101 diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 67be47194..4d66a67a3 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -404,17 +404,17 @@ void WS2812FX::setColor(uint8_t slot, uint32_t c) { } void WS2812FX::setBrightness(uint8_t b) { + if (gammaCorrectBri) b = gamma8(b); if (_brightness == b) return; - _brightness = (gammaCorrectBri) ? gamma8(b) : b; + _brightness = b; _segment_index = 0; - if (b == 0) { //unfreeze all segments on power off + if (_brightness == 0) { //unfreeze all segments on power off for (uint8_t i = 0; i < MAX_NUM_SEGMENTS; i++) { _segments[i].setOption(SEG_OPTION_FREEZE, false); } #if LEDPIN == LED_BUILTIN - if (!shouldStartBus) - shouldStartBus = true; + shouldStartBus = true; #endif } else { #if LEDPIN == LED_BUILTIN diff --git a/wled00/NpbWrapper.h b/wled00/NpbWrapper.h index 9d328242f..8c1860b25 100644 --- a/wled00/NpbWrapper.h +++ b/wled00/NpbWrapper.h @@ -45,7 +45,7 @@ //This can be useful if you want to chain multiple strings with incompatible color order //#define COLOR_ORDER_OVERRIDE #define COO_MIN 0 -#define COO_MAX 27 //not inclusive, this would set the override for LEDs 0-26 +#define COO_MAX 35 //not inclusive, this would set the override for LEDs 0-26 #define COO_ORDER COL_ORDER_GRB //END CONFIGURATION diff --git a/wled00/data/index.htm b/wled00/data/index.htm index cffcaa629..a9a7e519b 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -692,11 +692,11 @@ input[type=number]::-webkit-outer-spin-button { text-overflow: clip; } -.segid { +.pid { position: absolute; top: 0px; left: 0px; - padding: 10px 0px 0px 12px; + padding: 11px 0px 0px 11px; font-size: 16px; width: 20px; text-align: center; @@ -1164,7 +1164,7 @@ var pmt = 1, pmtLS = 0, pmtLast = 0; var lastinfo = {}; var cfg = { theme:{base:"dark", bg:{url:""}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}}, - comp :{colors:{picker: true, rgb: false, quick: true, hex: false}, labels:true, pcmbot:false} + comp :{colors:{picker: true, rgb: false, quick: true, hex: false}, labels:true, pcmbot:false, pid:true} }; var cpick = new iro.ColorPicker("#picker", { @@ -1559,9 +1559,9 @@ function populatePresets(fromls) if (qll) pQL.push([i, qll]); is.push(i); - cn += `
-
${i}
-
${pName(i)}
+ cn += `
`; + if (cfg.comp.pid) cn += `
${i}
`; + cn += `
${pName(i)}

`; diff --git a/wled00/data/settings_sync.htm b/wled00/data/settings_sync.htm index bd34c75fd..aa9f03330 100644 --- a/wled00/data/settings_sync.htm +++ b/wled00/data/settings_sync.htm @@ -34,7 +34,7 @@ UDP Port:
Receive Brightness, Color, and Effects
Send notifications on direct change:
-Send notifications on button press:
+Send notifications on button press or IR:
Send Alexa notifications:
Send Philips Hue change notifications:
Send Macro notifications:
diff --git a/wled00/data/settings_ui.htm b/wled00/data/settings_ui.htm index 8e84bce5c..90beb592b 100644 --- a/wled00/data/settings_ui.htm +++ b/wled00/data/settings_ui.htm @@ -18,7 +18,8 @@ "quick": "Quick color selectors", "hex": "HEX color input" }, - "pcmbot": "Show bottom tab bar in PC mode" + "pcmbot": "Show bottom tab bar in PC mode", + "pid": "Show preset IDs" }, "theme":{ "alpha": { @@ -189,7 +190,8 @@

UI Appearance

:
- :
+ :
+ :
I hate dark mode:
:
diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 23b840ca6..9c2df6d2c 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -167,7 +167,7 @@ const char PAGE_settings_dmx[] PROGMEM = R"=====()====="; // Autogenerated from wled00/data/settings_ui.htm, do not edit!! const char PAGE_settings_ui[] PROGMEM = R"=====(UI Settings