diff --git a/ESP32_AP-Flasher/data/www/content_cards.json.gz b/ESP32_AP-Flasher/data/www/content_cards.json.gz index 5b119d64..38f0a4ff 100644 Binary files a/ESP32_AP-Flasher/data/www/content_cards.json.gz and b/ESP32_AP-Flasher/data/www/content_cards.json.gz differ diff --git a/ESP32_AP-Flasher/data/www/main.js.gz b/ESP32_AP-Flasher/data/www/main.js.gz index 75ae834a..307f2eb1 100644 Binary files a/ESP32_AP-Flasher/data/www/main.js.gz and b/ESP32_AP-Flasher/data/www/main.js.gz differ diff --git a/ESP32_AP-Flasher/data/www/ota.js.gz b/ESP32_AP-Flasher/data/www/ota.js.gz index 3c0fc15c..3802564e 100644 Binary files a/ESP32_AP-Flasher/data/www/ota.js.gz and b/ESP32_AP-Flasher/data/www/ota.js.gz differ diff --git a/ESP32_AP-Flasher/src/contentmanager.cpp b/ESP32_AP-Flasher/src/contentmanager.cpp index d1622d43..93835c45 100644 --- a/ESP32_AP-Flasher/src/contentmanager.cpp +++ b/ESP32_AP-Flasher/src/contentmanager.cpp @@ -1378,8 +1378,7 @@ bool getCalFeed(String &filename, JsonObject &cfgobj, tagRecord *&taginfo, imgPa if (loc["colors1"].is() && loc["colors1"].size() > calendarId) { background = getColor(loc["colors1"][calendarId]); border = getColor(loc["colors2"][calendarId]); - textcolor = getColor(loc["colors3"][calendarId]); - Serial.println("cal " + String(calendarId) + ": " + String(loc["colors2"][calendarId])); + if (loc["colors3"][calendarId]) textcolor = getColor(loc["colors3"][calendarId]); } spr.fillRect(eventX - 1, eventY - 2, colWidth * (fulldayend - fulldaystart) - 3, lineHeight - 1, background); spr.drawRect(eventX - 2, eventY - 3, colWidth * (fulldayend - fulldaystart) - 1, lineHeight + 1, border); @@ -1459,8 +1458,7 @@ bool getCalFeed(String &filename, JsonObject &cfgobj, tagRecord *&taginfo, imgPa if (loc["colors1"].is() && loc["colors1"].size() > calendarId) { background = getColor(loc["colors1"][calendarId]); border = getColor(loc["colors2"][calendarId]); - textcolor = getColor(loc["colors3"][calendarId]); - Serial.println("cal " + String(calendarId) + ": " + String(loc["colors2"][calendarId])); + if (loc["colors3"][calendarId]) textcolor = getColor(loc["colors3"][calendarId]); } spr.fillRect(eventX + 2, eventY + 1, colWidth - 3, (duration * hourHeight / 60) - 1, background); spr.drawRect(eventX + 1, eventY, colWidth - 1, (duration * hourHeight / 60) + 1, border); @@ -2295,6 +2293,14 @@ void drawElement(const JsonObject &element, TFT_eSprite &spr, imgParam &imagePar } else if (element.containsKey("circle")) { const JsonArray &circleArray = element["circle"]; spr.fillCircle(circleArray[0].as(), circleArray[1].as(), circleArray[2].as(), getColor(circleArray[3])); + if (circleArray.size() >= 6) { + for (int i = 0; i < circleArray[5].as(); i++) { + spr.drawCircle(circleArray[0].as(), circleArray[1].as(), circleArray[2].as() - i, getColor(circleArray[4])); + if (i > 0) { + spr.drawCircle(circleArray[0].as(), circleArray[1].as(), circleArray[2].as() - i - 0.5, getColor(circleArray[4])); + } + } + } } else if (element.containsKey("image")) { const JsonArray &imgArray = element["image"]; diff --git a/ESP32_AP-Flasher/src/newproto.cpp b/ESP32_AP-Flasher/src/newproto.cpp index 5f8d722b..12f7c6bc 100644 --- a/ESP32_AP-Flasher/src/newproto.cpp +++ b/ESP32_AP-Flasher/src/newproto.cpp @@ -986,15 +986,17 @@ bool queueDataAvail(struct pendingData* pending, bool local) { taginfo->data = nullptr; } else { newPending.data = nullptr; - - // optional: read data early, don't wait for block request. - fs::File file = contentFS->open(newPending.filename); - if (file) { - newPending.data = getDataForFile(file); - Serial.println("Reading file " + String(newPending.filename)); - file.close(); - } else { - Serial.println("Warning: not found: " + String(newPending.filename)); + + if (pendingQueue.size() < 5) { // maximized to 5 to save some memory + // optional: read data early, don't wait for block request. + fs::File file = contentFS->open(newPending.filename); + if (file) { + newPending.data = getDataForFile(file); + Serial.println("Reading file " + String(newPending.filename)); + file.close(); + } else { + Serial.println("Warning: not found: " + String(newPending.filename)); + } } } newPending.len = taginfo->len; diff --git a/ESP32_AP-Flasher/src/ota.cpp b/ESP32_AP-Flasher/src/ota.cpp index 52821fed..96ad558e 100644 --- a/ESP32_AP-Flasher/src/ota.cpp +++ b/ESP32_AP-Flasher/src/ota.cpp @@ -43,6 +43,7 @@ void handleSysinfoRequest(AsyncWebServerRequest* request) { doc["rollback"] = Update.canRollBack(); #if defined C6_OTA_FLASHING doc["hasC6"] = 1; + doc["C6version"] = apInfo.version; #else doc["hasC6"] = 0; #endif diff --git a/ESP32_AP-Flasher/src/web.cpp b/ESP32_AP-Flasher/src/web.cpp index 183d9e03..f13f64a6 100644 --- a/ESP32_AP-Flasher/src/web.cpp +++ b/ESP32_AP-Flasher/src/web.cpp @@ -31,8 +31,6 @@ #include "webflasher.h" #endif -extern uint8_t data_to_send[]; - AsyncWebServer server(80); AsyncWebSocket ws("/ws"); WifiManager wm; diff --git a/ESP32_AP-Flasher/wwwroot/main.js b/ESP32_AP-Flasher/wwwroot/main.js index ad708568..89e4bc42 100644 --- a/ESP32_AP-Flasher/wwwroot/main.js +++ b/ESP32_AP-Flasher/wwwroot/main.js @@ -1795,6 +1795,9 @@ function populateAPInfo(apip) { version += `esp32 version: ${data.buildversion}
`; version += `psram size: ${data.psramsize}
`; version += `flash size: ${data.flashsize}
`; + if (data.hasC6) { + version += `ESP-C6/H2 version: 0x${parseInt(data.C6version).toString(16).toUpperCase()}
`; + } $('#ap' + apid + ' .apswversion').innerHTML = version; } }) diff --git a/ESP32_AP-Flasher/wwwroot/ota.js b/ESP32_AP-Flasher/wwwroot/ota.js index 5e054aff..9cf39e32 100644 --- a/ESP32_AP-Flasher/wwwroot/ota.js +++ b/ESP32_AP-Flasher/wwwroot/ota.js @@ -62,6 +62,9 @@ export async function initUpdate() { print(`filesystem version: ${filesystemversion}`); print(`psram size: ${sdata.psramsize}`); print(`flash size: ${sdata.flashsize}`); + if (sdata.hasC6) { + print(`ESP-C6/H2 version: 0x${parseInt(sdata.C6version).toString(16).toUpperCase()}`); + } print("--------------------------", "gray"); env = apConfig.env || sdata.env; if (sdata.env != env) {