diff --git a/wled00/data/index.htm b/wled00/data/index.htm index a2340a973..d6f918498 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -13,6 +13,7 @@ var fxa=false; var psa=false; var uwv=false; + var firstload=true; var lastsx = 0; var nState = 0; bCol = "DarkTurquoise"; @@ -61,7 +62,7 @@ nState = 0; nState = (this.responseXML.getElementsByTagName('nr')[0].innerHTML)!=0?1:0; nState += (this.responseXML.getElementsByTagName('ns')[0].innerHTML)!=0?2:0; - hsb = (this.responseXML.getElementsByTagName('md')[0].innerHTML)!=0?true:false; + if(firstload)hsb = (this.responseXML.getElementsByTagName('md')[0].innerHTML)!=0?true:false; d.getElementsByClassName("desc")[0].innerHTML = this.responseXML.getElementsByTagName('desc')[0].innerHTML; UV(); } @@ -71,6 +72,7 @@ request.open("GET", "win/" +resp +nocache, true); request.send(null); resp=""; + firstload=false; } function GetCheck() { diff --git a/wled00/data/settings.htm b/wled00/data/settings.htm index 7b551c88e..327b47eab 100644 --- a/wled00/data/settings.htm +++ b/wled00/data/settings.htm @@ -61,7 +61,7 @@ Server description:
Use HSB sliders instead of RGB by default:

LED setup

- LED count (max. 255):
+ LED count (max. 255):
The default boot color is always saved in preset slot 0.
Alternatively, apply preset at boot
Default RGB color: diff --git a/wled00/htmls00.h b/wled00/htmls00.h index 6a91dd27f..2d9c5354f 100644 --- a/wled00/htmls00.h +++ b/wled00/htmls00.h @@ -26,7 +26,7 @@ const char PAGE_index0[] PROGMEM = R"=====( WLED 0.5dev - + )====="; diff --git a/wled00/htmls01.h b/wled00/htmls01.h index 7543e9231..fb01a8a2f 100644 --- a/wled00/htmls01.h +++ b/wled00/htmls01.h @@ -60,7 +60,7 @@ AP IP: Not active
Server description:
Use HSB sliders instead of RGB by default:

LED setup

-LED count (max. 255):
+LED count (max. 255):
The default boot color is saved in preset slot 0.
Alternatively, apply preset at boot
Default RGB color: diff --git a/wled00/wled00.ino b/wled00/wled00.ino index 92d10e354..7bfb9d6ec 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -19,6 +19,7 @@ #include #endif #include +#include #include #include "src/dependencies/time/Time.h" #include "src/dependencies/time/TimeLib.h" @@ -28,7 +29,7 @@ #include "WS2812FX.h" //version in format yymmddb (b = daily build) -#define VERSION 1801102 +#define VERSION 1801140 const String versionName = "WLED 0.5dev"; //AP and OTA default passwords (change them!) @@ -98,6 +99,7 @@ boolean recoveryAPDisabled = false; IPAddress staticip(0, 0, 0, 0); IPAddress staticgateway(0, 0, 0, 0); IPAddress staticsubnet(255, 255, 255, 0); +IPAddress staticdns(8, 8, 8, 8); //only for NTP boolean useHSB = false, useHSBDefault = false; boolean turnOnAtBoot = true; uint8_t bootPreset = 0; @@ -189,8 +191,8 @@ const unsigned long seventyYears = 2208988800UL; uint8_t overlayDefault = 0; uint8_t overlayCurrent = 0; #ifdef USEOVERLAYS -int overlayMin = 0, overlayMax = 79; -int analogClock12pixel = 25; +int overlayMin = 0, overlayMax = 79; //bb: 35, 46, t: 0, 79 +int analogClock12pixel = 25; //bb: 41, t: 25 bool overlayDimBg = true; boolean analogClockSecondsTrail = false; boolean analogClock5MinuteMarks = false; @@ -312,6 +314,7 @@ void loop() { yield(); handleButton(); handleNetworkTime(); + if (!otaLock) ArduinoOTA.handle(); #ifdef CRONIXIE handleCronixie(); #endif @@ -324,7 +327,7 @@ void loop() { #endif strip.service(); } - + //DEBUG #ifdef DEBUG if (millis() - debugTime > 5000) diff --git a/wled00/wled03_set.ino b/wled00/wled03_set.ino index eb4b6692d..69e2d5bd3 100644 --- a/wled00/wled03_set.ino +++ b/wled00/wled03_set.ino @@ -537,7 +537,7 @@ boolean handleSet(String req) pos = req.indexOf("CT="); if (pos > 0) { countdownTime = req.substring(pos+3).toInt(); - countdownOverTriggered = false; + if (countdownTime - now() > 0) countdownOverTriggered = false; } //set custom chase data bool _cc_updated = false; diff --git a/wled00/wled05_init.ino b/wled00/wled05_init.ino index 04d160776..792bf5092 100644 --- a/wled00/wled05_init.ino +++ b/wled00/wled05_init.ino @@ -31,7 +31,7 @@ void wledInit() if (staticip[0] != 0) { - WiFi.config(staticip, staticgateway, staticsubnet); + WiFi.config(staticip, staticgateway, staticsubnet, staticdns); } else { WiFi.config(0U, 0U, 0U); @@ -183,9 +183,11 @@ void wledInit() httpUpdater.setup(&server); //only for ESP8266 #else server.on("/update", HTTP_GET, [](){ - server.send(200, "text/plain", "OTA update is not supported on ESP32 at this time."); + server.send(200, "text/plain", "OTA update is not supported on ESP32 at this time. You may want to use ArduinoOTA."); }); #endif + //init ArduinoOTA + ArduinoOTA.begin(); } else { server.on("/edit", HTTP_GET, [](){ @@ -221,7 +223,7 @@ void wledInit() DEBUG_PRINTLN("HTTP server started"); // Add service to MDNS MDNS.addService("http", "tcp", 80); - + // Initialize NeoPixel Strip strip.init(); strip.setLedCount(ledcount); @@ -230,6 +232,8 @@ void wledInit() strip.setSpeed(effectSpeed); strip.setBrightness(255); strip.start(); + + #ifdef CRONIXIE strip.driverModeCronixie(true); strip.setCronixieBacklight(cronixieBacklight); diff --git a/wled00/wled10_ntp.ino b/wled00/wled10_ntp.ino index 5017d172f..a2f7d0ebc 100644 --- a/wled00/wled10_ntp.ino +++ b/wled00/wled10_ntp.ino @@ -21,7 +21,7 @@ void handleNetworkTime() void sendNTPPacket() { WiFi.hostByName(ntpServerName, ntpServerIP); - Serial.println("sending NTP packet..."); + DEBUG_PRINTLN("send NTP packet"); memset(ntpPacketBuffer, 0, NTP_PACKET_SIZE); @@ -59,6 +59,7 @@ boolean checkNTPResponse() unsigned long epoch = secsSince1900 - seventyYears; setTime(epoch); DEBUG_PRINTLN(epoch); + if (countdownTime - now() > 0) countdownOverTriggered = false; return true; } return false; diff --git a/wled00/wled11_ol.ino b/wled00/wled11_ol.ino index b6e21bc53..381958641 100644 --- a/wled00/wled11_ol.ino +++ b/wled00/wled11_ol.ino @@ -160,12 +160,12 @@ void _overlayAnalogClock() } if (analogClockSecondsTrail) { - strip.setRange(analogClock12pixel, secondPixel, 0x00FF00); + strip.setRange(analogClock12pixel, secondPixel, 0xFF0000); } else { - strip.setIndividual(secondPixel, 0x00FF00); + strip.setIndividual(secondPixel, 0xFF0000); } - strip.setIndividual(minutePixel, 0xEEEEEE); + strip.setIndividual(minutePixel, 0x00FF00); strip.setIndividual(hourPixel, 0x0000FF); overlayRefreshMs = 998; } diff --git a/wled00/wled13_cronixie.ino b/wled00/wled13_cronixie.ino index ea7950fdb..316150cb6 100644 --- a/wled00/wled13_cronixie.ino +++ b/wled00/wled13_cronixie.ino @@ -1,3 +1,6 @@ +/* + * Support for the Cronixie clock + */ #ifdef CRONIXIE uint8_t getSameCodeLength(char code, int index, char const digits[]) {