diff --git a/wled00/NpbWrapper.h b/wled00/NpbWrapper.h index 173a4917..f94ed201 100644 --- a/wled00/NpbWrapper.h +++ b/wled00/NpbWrapper.h @@ -6,7 +6,7 @@ #define LEDPIN 2 //strip pin. Any for ESP32, gpio2 or 3 is recommended for ESP8266 (gpio2/3 are labeled D4/RX on NodeMCU and Wemos) //#define USE_APA102 // Uncomment for using APA102 LEDs. #define BTNPIN 0 //button pin. Needs to have pullup (gpio0 recommended) -#define IR_PIN -1 //infrared pin (-1 to disable) +#define IR_PIN 4 //infrared pin (-1 to disable) #define RLYPIN 12 //pin for relay, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,... #define AUXPIN -1 //debug auxiliary output pin (-1 to disable) diff --git a/wled00/WS2812FX_fcn.cpp b/wled00/WS2812FX_fcn.cpp index 064b0152..67bc46cb 100644 --- a/wled00/WS2812FX_fcn.cpp +++ b/wled00/WS2812FX_fcn.cpp @@ -350,8 +350,9 @@ void WS2812FX::setColor(uint8_t slot, uint32_t c) { void WS2812FX::setBrightness(uint8_t b) { if (_brightness == b) return; - _brightness = gammaCorrectBri ? gamma8(b) : b; - if (SEGENV.next_time > millis() + 20) show(); //apply brightness change immediately if no refresh soon + _brightness = (gammaCorrectBri) ? gamma8(b) : b; + _segment_index = 0; + if (SEGENV.next_time > millis() + 22) show();//apply brightness change immediately if no refresh soon } uint8_t WS2812FX::getMode(void) { @@ -535,6 +536,7 @@ void WS2812FX::unlockAll() void WS2812FX::setTransitionMode(bool t) { + _segment_index = 0; SEGMENT.setOption(7,t); if (!t) return; unsigned long waitMax = millis() + 20; //refresh after 20 ms if transition enabled @@ -779,7 +781,7 @@ void WS2812FX::handle_palette(void) uint32_t WS2812FX::color_from_palette(uint16_t i, bool mapping, bool wrap, uint8_t mcol, uint8_t pbri) { - if (SEGMENT.palette == 0 && mcol < 3) return SEGMENT.colors[mcol]; //WS2812FX default + if (SEGMENT.palette == 0 && mcol < 3) return SEGCOLOR(mcol); //WS2812FX default uint8_t paletteIndex = i; if (mapping) paletteIndex = map(i,SEGMENT.start,SEGMENT.stop-1,0,255); if (!wrap) paletteIndex = scale8(paletteIndex, 240); //cut off blend at palette "end" diff --git a/wled00/data/welcome.htm b/wled00/data/welcome.htm index b5cdb54d..0542aff5 100644 --- a/wled00/data/welcome.htm +++ b/wled00/data/welcome.htm @@ -17,9 +17,6 @@ button { outline: none; cursor: pointer; - } - - .btn { padding: 8px; margin: 10px; width: 230px; @@ -49,9 +46,9 @@ If you encounter a bug or have a question/feature suggestion, feel free to open a GitHub issue!

Next steps:

Connect the module to your local WiFi here!
-
+
Just trying this out in AP mode?
- + \ No newline at end of file diff --git a/wled00/wled00.ino b/wled00/wled00.ino index b3c0a0a6..4aad5ded 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -98,7 +98,7 @@ //version code in format yymmddb (b = daily build) -#define VERSION 1909122 +#define VERSION 1909194 char versionString[] = "0.8.5"; diff --git a/wled00/wled03_set.ino b/wled00/wled03_set.ino index c1a51bd4..f46dc3b0 100644 --- a/wled00/wled03_set.ino +++ b/wled00/wled03_set.ino @@ -111,6 +111,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) nightlightTargetBri = request->arg("TB").toInt(); t = request->arg("TL").toInt(); if (t > 0) nightlightDelayMinsDefault = t; + nightlightDelayMins = nightlightDelayMinsDefault; nightlightFade = request->hasArg("TW"); t = request->arg("PB").toInt(); diff --git a/wled00/wled05_init.ino b/wled00/wled05_init.ino index 8bc9ee29..5fae369b 100644 --- a/wled00/wled05_init.ino +++ b/wled00/wled05_init.ino @@ -148,8 +148,6 @@ void wledInit() void beginStrip() { // Initialize NeoPixel Strip and button - strip.setColor(0, 0); - strip.setBrightness(255); #ifdef BTNPIN pinMode(BTNPIN, INPUT_PULLUP);