From ed0e73803ff124626c10702c41a68b2379e9d392 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Fri, 14 Jun 2024 22:12:09 +0200 Subject: [PATCH] Minor tweaks for ESP8266 - update was restarting device on some occasions - a bit of throttling in UI --- wled00/data/index.js | 4 ++-- wled00/json.cpp | 2 +- wled00/util.cpp | 2 +- wled00/wled.h | 4 ++-- wled00/xml.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index 5eacdc507..a76cf6c86 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -282,12 +282,12 @@ function onLoad() // fill effect extra data array loadFXData(()=>{ // load and populate effects - loadFX(()=>{ + setTimeout(()=>{loadFX(()=>{ loadPalettesData(()=>{ requestJson();// will load presets and create WS if (cfg.comp.css) setTimeout(()=>{loadSkinCSS('skinCss')},50); }); - }); + })},50); }); }); resetUtil(); diff --git a/wled00/json.cpp b/wled00/json.cpp index 1f9b0fae6..134287591 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -638,7 +638,7 @@ void serializeInfo(JsonObject root) root[F("ver")] = versionString; root[F("vid")] = VERSION; root[F("cn")] = F(WLED_CODENAME); - root[F("release")] = FPSTR(releaseString); + root[F("release")] = releaseString; JsonObject leds = root.createNestedObject(F("leds")); leds[F("count")] = strip.getLengthTotal(); diff --git a/wled00/util.cpp b/wled00/util.cpp index ad7e4b670..1a5c03c27 100644 --- a/wled00/util.cpp +++ b/wled00/util.cpp @@ -215,7 +215,7 @@ bool requestJSONBufferLock(uint8_t module) } unsigned long now = millis(); - while (jsonBufferLock && millis()-now < 100) delay(1); // wait for fraction for buffer lock + while (jsonBufferLock && millis()-now < 250) delay(1); // wait for fraction for buffer lock if (jsonBufferLock) { DEBUG_PRINT(F("ERROR: Locking JSON buffer failed! (still locked by ")); diff --git a/wled00/wled.h b/wled00/wled.h index d6438d2c7..5dff7b0ee 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2406120 +#define VERSION 2406121 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG @@ -268,7 +268,7 @@ using PSRAMDynamicJsonDocument = BasicJsonDocument; // Global Variable definitions WLED_GLOBAL char versionString[] _INIT(TOSTRING(WLED_VERSION)); -WLED_GLOBAL char releaseString[] _INIT_PROGMEM(TOSTRING(WLED_RELEASE_NAME)); // somehow this will not work if using "const char releaseString[] +WLED_GLOBAL char releaseString[] _INIT(TOSTRING(WLED_RELEASE_NAME)); // somehow this will not work if using "const char releaseString[] #define WLED_CODENAME "Kōsen" // AP and OTA default passwords (for maximum security change them!) diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 69274da13..1eacb6eac 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -726,7 +726,7 @@ void getSettingsJS(byte subPage, char* dest) olen -= 2; //delete "; oappend(versionString); oappend(SET_F("
")); - oappend((char*)FPSTR(releaseString)); + oappend(releaseString); oappend(SET_F("
(")); #if defined(ARDUINO_ARCH_ESP32) oappend(ESP.getChipModel());