diff --git a/ESP32_AP-Flasher/data/www/index.html.gz b/ESP32_AP-Flasher/data/www/index.html.gz
index a369830b..8ae02dee 100644
Binary files a/ESP32_AP-Flasher/data/www/index.html.gz and b/ESP32_AP-Flasher/data/www/index.html.gz differ
diff --git a/ESP32_AP-Flasher/data/www/main.js.gz b/ESP32_AP-Flasher/data/www/main.js.gz
index ee8fa512..289da7c1 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/include/tag_db.h b/ESP32_AP-Flasher/include/tag_db.h
index 21ffa38f..7465429d 100644
--- a/ESP32_AP-Flasher/include/tag_db.h
+++ b/ESP32_AP-Flasher/include/tag_db.h
@@ -75,6 +75,7 @@ struct Config {
uint8_t discovery;
String repo;
String env;
+ uint8_t showtimestamp;
};
struct Color {
diff --git a/ESP32_AP-Flasher/platformio.ini b/ESP32_AP-Flasher/platformio.ini
index 36494404..cc32e130 100644
--- a/ESP32_AP-Flasher/platformio.ini
+++ b/ESP32_AP-Flasher/platformio.ini
@@ -6,9 +6,8 @@ platform = platformio/espressif32@^6.10.0
;platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = arduino
lib_deps =
- ESP32Async/AsyncTCP
- ESP32Async/ESPAsyncWebServer
-
+ ESP32Async/AsyncTCP
+ ESP32Async/ESPAsyncWebServer
bblanchon/ArduinoJson
bodmer/TFT_eSPI
https://github.com/Bodmer/TJpg_Decoder.git
@@ -30,7 +29,9 @@ build_flags =
-D DISABLE_ALL_LIBRARY_WARNINGS
-D ILI9341_DRIVER
-D SMOOTH_FONT
- -D ARDUINOJSON_ENABLE_COMMENTS=1
+ -D LOAD_FONT2
+ -D LOAD_GLCD
+ -D ARDUINOJSON_ENABLE_COMMENTS=1
; ----------------------------------------------------------------------------------------
; !!! this configuration expects the 16MB Flash / 8MB Ram version of the ESP32-S3-DevkitC1
; ----------------------------------------------------------------------------------------
@@ -101,11 +102,11 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D ARDUINO_USB_MODE=1
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
- -D ILI9341_DRIVER
+ -D ARDUINO_USB_MODE=1
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D ILI9341_DRIVER
lib_deps =
- ${env.lib_deps}
+ ${env.lib_deps}
build_flags =
-std=gnu++17
${env.build_flags}
@@ -144,7 +145,6 @@ build_flags =
-D TFT_RST=1
-D TFT_RGB_ORDER=TFT_BGR
-D USE_HSPI_PORT
- -D LOAD_FONT2
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=50
@@ -169,8 +169,8 @@ monitor_dtr = 0
monitor_rts = 0
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
- ;-D ILI9341_DRIVER
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ ;-D ILI9341_DRIVER
lib_deps = ${env.lib_deps}
lib_extra_dirs = lib2/Arduino_GFX-1.3.7
build_flags =
@@ -207,7 +207,6 @@ build_flags =
-D TFT_HEIGHT=480
-D TFT_HW_TYPE=226
-D USE_HSPI_PORT
- -D LOAD_FONT2
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=200
@@ -233,11 +232,11 @@ monitor_dtr = 0
monitor_rts = 0
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
lib_deps = ${env.lib_deps}
lib_extra_dirs = lib2/Arduino_GFX-1.3.7
- lib2/gt911-touch
-build_flags =
+ lib2/gt911-touch
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_TFT
@@ -250,7 +249,7 @@ build_flags =
-D BOARD_HAS_PSRAM
-D CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
-D HAS_BLE_WRITER
- -D FLASHER_AP_SS=-1
+ -D FLASHER_AP_SS=-1
-D FLASHER_AP_CLK=-1
-D FLASHER_AP_MOSI=-1
-D FLASHER_AP_MISO=-1
@@ -272,7 +271,6 @@ build_flags =
-D TFT_HEIGHT=480
-D TFT_HW_TYPE=226
-D USE_HSPI_PORT
- -D LOAD_FONT2
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=200
@@ -295,15 +293,15 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_BLE_WRITER
-D CORE_DEBUG_LEVEL=0
- -D ARDUINO_USB_CDC_ON_BOOT
+ -D ARDUINO_USB_CDC_ON_BOOT
-D CONFIG_ESP32S3_SPIRAM_SUPPORT=1
-D CONFIG_SPIRAM_USE_MALLOC=1
-D POWER_NO_SOFT_POWER
@@ -344,15 +342,15 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_BLE_WRITER
-D CORE_DEBUG_LEVEL=0
- -D ARDUINO_USB_CDC_ON_BOOT
+ -D ARDUINO_USB_CDC_ON_BOOT
-D CONFIG_ESP32S3_SPIRAM_SUPPORT=1
-D CONFIG_SPIRAM_USE_MALLOC=1
-D POWER_NO_SOFT_POWER
@@ -393,15 +391,15 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_BLE_WRITER
-D CORE_DEBUG_LEVEL=0
- -D ARDUINO_USB_CDC_ON_BOOT
+ -D ARDUINO_USB_CDC_ON_BOOT
-D CONFIG_ESP32S3_SPIRAM_SUPPORT=1
-D CONFIG_SPIRAM_USE_MALLOC=1
-D POWER_NO_SOFT_POWER
@@ -445,16 +443,16 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
-D ILI9341_DRIVER
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_TFT
-D CORE_DEBUG_LEVEL=1
- -D ARDUINO_USB_CDC_ON_BOOT=1
+ -D ARDUINO_USB_CDC_ON_BOOT=1
-D CONFIG_ESP32S3_SPIRAM_SUPPORT=1
-D CONFIG_SPIRAM_USE_MALLOC=1
-D POWER_NO_SOFT_POWER
@@ -489,16 +487,13 @@ build_flags =
-D TFT_RST=1
-D TFT_RGB_ORDER=TFT_BGR
-D USE_HSPI_PORT
- -D LOAD_FONT2
- -D LOAD_FONT4
- -D LOAD_GLCD
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=200
-D SERIAL_FLASHER_RESET_HOLD_TIME_MS=200
-D C6_OTA_FLASHING
- -D HAS_SUBGHZ
-build_src_filter =
+ -D HAS_SUBGHZ
+build_src_filter =
+<*>---
board_build.flash_mode=qio
board_build.arduino.memory_type = qio_opi
@@ -514,16 +509,16 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
-D ILI9341_DRIVER
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_TFT
-D CORE_DEBUG_LEVEL=1
- -D ARDUINO_USB_CDC_ON_BOOT=1
+ -D ARDUINO_USB_CDC_ON_BOOT=1
-D CONFIG_ESP32S3_SPIRAM_SUPPORT=1
-D CONFIG_SPIRAM_USE_MALLOC=1
-D POWER_NO_SOFT_POWER
@@ -558,16 +553,13 @@ build_flags =
-D TFT_RST=1
-D TFT_RGB_ORDER=TFT_BGR
-D USE_HSPI_PORT
- -D LOAD_FONT2
- -D LOAD_FONT4
- -D LOAD_GLCD
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=200
-D SERIAL_FLASHER_RESET_HOLD_TIME_MS=200
-D C6_OTA_FLASHING
- -D HAS_SUBGHZ
-build_src_filter =
+ -D HAS_SUBGHZ
+build_src_filter =
+<*>---
board_build.flash_mode=qio
board_build.arduino.memory_type = qio_opi
@@ -583,11 +575,11 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D ARDUINO_USB_MODE=1
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D ARDUINO_USB_MODE=1
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D CORE_DEBUG_LEVEL=0
@@ -633,8 +625,8 @@ build_unflags =
-D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
-std=gnu++11
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D OPENEPAPERLINK_POE_AP_PCB
@@ -676,17 +668,17 @@ monitor_dtr = 0
monitor_rts = 0
build_unflags =
-std=gnu++11
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
-D ILI9341_DRIVER
lib_deps =
- ${env.lib_deps}
-build_flags =
+ ${env.lib_deps}
+build_flags =
-std=gnu++17
${env.build_flags}
-D HAS_TFT
-D HAS_EXT_FLASHER
-D CORE_DEBUG_LEVEL=1
- -D ARDUINO_USB_CDC_ON_BOOT=1
+ -D ARDUINO_USB_CDC_ON_BOOT=1
-D CONFIG_ESP32S3_SPIRAM_SUPPORT=1
-D CONFIG_SPIRAM_USE_MALLOC=1
-D POWER_NO_SOFT_POWER
@@ -741,16 +733,13 @@ build_flags =
-D TFT_RST=1
-D TFT_RGB_ORDER=TFT_BGR
-D USE_HSPI_PORT
- -D LOAD_FONT2
- -D LOAD_FONT4
- -D LOAD_GLCD
-D MD5_ENABLED=1
-D SERIAL_FLASHER_INTERFACE_UART=1
-D SERIAL_FLASHER_BOOT_HOLD_TIME_MS=200
-D SERIAL_FLASHER_RESET_HOLD_TIME_MS=200
-D C6_OTA_FLASHING
- -D HAS_SUBGHZ
-build_src_filter =
+ -D HAS_SUBGHZ
+build_src_filter =
+<*>
board_build.flash_mode=qio
board_build.arduino.memory_type = qio_opi
@@ -767,11 +756,11 @@ board = esp32-s3-devkitc-1
board_build.partitions = large_spiffs_16MB.csv
build_unflags =
-std=gnu++11
- -D ARDUINO_USB_MODE=1
- -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
- -D ILI9341_DRIVER
+ -D ARDUINO_USB_MODE=1
+ -D CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
+ -D ILI9341_DRIVER
lib_deps =
- ${env.lib_deps}
+ ${env.lib_deps}
build_flags =
-std=gnu++17
${env.build_flags}
diff --git a/ESP32_AP-Flasher/src/contentmanager.cpp b/ESP32_AP-Flasher/src/contentmanager.cpp
index 284e9f91..19ef5da6 100644
--- a/ESP32_AP-Flasher/src/contentmanager.cpp
+++ b/ESP32_AP-Flasher/src/contentmanager.cpp
@@ -54,17 +54,22 @@ void contentRunner() {
time_t now;
time(&now);
+ uint8_t wifimac[8];
+ WiFi.macAddress(wifimac);
+ memset(&wifimac[6], 0, 2);
for (tagRecord *taginfo : tagDB) {
+
+ const bool isAp = memcmp(taginfo->mac, wifimac, 8) == 0;
if (taginfo->RSSI &&
(now >= taginfo->nextupdate || needRedraw(taginfo->contentMode, taginfo->wakeupReason)) &&
- config.runStatus == RUNSTATUS_RUN &&
- Storage.freeSpace() > 31000 && !util::isSleeping(config.sleepTime1, config.sleepTime2)) {
+ config.runStatus == RUNSTATUS_RUN && (taginfo->expectedNextCheckin < now + 300 || isAp) &&
+ Storage.freeSpace() > 31000 && !util::isSleeping(config.sleepTime1, config.sleepTime2)) {
drawNew(taginfo->mac, taginfo);
taginfo->wakeupReason = 0;
}
- if (taginfo->expectedNextCheckin > now - 10 && taginfo->expectedNextCheckin < now + 30 && taginfo->pendingIdle == 0 && taginfo->pendingCount == 0) {
+ if (taginfo->expectedNextCheckin > now - 10 && taginfo->expectedNextCheckin < now + 30 && taginfo->pendingIdle == 0 && taginfo->pendingCount == 0 && !isAp) {
int32_t minutesUntilNextUpdate = (taginfo->nextupdate - now) / 60;
if (minutesUntilNextUpdate > config.maxsleep) {
minutesUntilNextUpdate = config.maxsleep;
@@ -82,6 +87,7 @@ void contentRunner() {
}
if (minutesUntilNextUpdate > 1 && (wsClientCount() == 0 || config.stopsleep == 0)) {
taginfo->pendingIdle = minutesUntilNextUpdate * 60;
+ taginfo->expectedNextCheckin = now + taginfo->pendingIdle;
if (taginfo->isExternal == false) {
prepareIdleReq(taginfo->mac, minutesUntilNextUpdate);
}
diff --git a/ESP32_AP-Flasher/src/makeimage.cpp b/ESP32_AP-Flasher/src/makeimage.cpp
index 982e61ed..dd8d0f0a 100644
--- a/ESP32_AP-Flasher/src/makeimage.cpp
+++ b/ESP32_AP-Flasher/src/makeimage.cpp
@@ -365,9 +365,23 @@ uint8_t *g5Compress(uint16_t width, uint16_t height, uint8_t *buffer, uint16_t b
}
#endif
+void doTimestamp(TFT_eSprite *spr) {
+ time_t now = time(nullptr);
+ struct tm *timeinfo = localtime(&now);
+ char buffer[20];
+ strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M", timeinfo);
+
+ // spr->drawRect(spr->width() - 16 * 6 - 4, spr->height() - 10 - 2, 16 * 6 + 3, 11, TFT_BLACK);
+ spr->drawRect(spr->width() - 16 * 6 - 3, spr->height() - 10 - 1, 16 * 6 + 1, 9, TFT_WHITE);
+ spr->setTextColor(TFT_BLACK, TFT_WHITE);
+ spr->setCursor(spr->width() - 16 * 6 - 2, spr->height() - 10, 1);
+ spr->print(buffer);
+}
+
void spr2buffer(TFT_eSprite &spr, String &fileout, imgParam &imageParams) {
long t = millis();
+ if (config.showtimestamp) doTimestamp(&spr);
#ifdef HAS_TFT
extern uint8_t YellowSense;
if (fileout == "direct") {
diff --git a/ESP32_AP-Flasher/src/newproto.cpp b/ESP32_AP-Flasher/src/newproto.cpp
index 14fe25c7..37c5a45c 100644
--- a/ESP32_AP-Flasher/src/newproto.cpp
+++ b/ESP32_AP-Flasher/src/newproto.cpp
@@ -507,9 +507,9 @@ void processXferTimeout(struct espXferComplete* xfc, bool local) {
if (taginfo != nullptr) {
taginfo->pendingIdle = 60;
clearPending(taginfo);
- while (dequeueItem(xfc->src)) {
- };
}
+ while (dequeueItem(xfc->src)) {
+ };
checkQueue(xfc->src);
@@ -560,15 +560,14 @@ void processDataReq(struct espAvailDataReq* eadr, bool local, IPAddress remoteIP
taginfo->apIp = IPAddress(0, 0, 0, 0);
}
- if (taginfo->pendingIdle == 0) {
- taginfo->expectedNextCheckin = now + 60;
+ if (taginfo->pendingIdle == 0 || countQueueItem(eadr->src) > 0) {
+ if (taginfo->expectedNextCheckin < now + 60) taginfo->expectedNextCheckin = now + 60;
} else if (taginfo->pendingIdle == 9999) {
taginfo->expectedNextCheckin = 3216153600;
- taginfo->pendingIdle = 0;
} else {
taginfo->expectedNextCheckin = now + taginfo->pendingIdle;
- taginfo->pendingIdle = 0;
}
+ taginfo->pendingIdle = 0;
taginfo->lastseen = now;
if (eadr->adr.lastPacketRSSI != 0) {
@@ -607,6 +606,7 @@ void processDataReq(struct espAvailDataReq* eadr, bool local, IPAddress remoteIP
if (local) {
sprintf(buffer, "src[7], eadr->src[6], eadr->src[5], eadr->src[4], eadr->src[3], eadr->src[2], eadr->src[1], eadr->src[0]);
Serial.print(buffer);
+ checkQueue(eadr->src); // experiemental 3/26/25: redundant check
}
if (local) {
diff --git a/ESP32_AP-Flasher/src/tag_db.cpp b/ESP32_AP-Flasher/src/tag_db.cpp
index 4feba865..a0abebe0 100644
--- a/ESP32_AP-Flasher/src/tag_db.cpp
+++ b/ESP32_AP-Flasher/src/tag_db.cpp
@@ -211,7 +211,7 @@ bool loadDB(const String& filename) {
taginfo->nextupdate = (uint32_t)tag["nextupdate"];
taginfo->expectedNextCheckin = (uint32_t)tag["nextcheckin"];
if (taginfo->expectedNextCheckin < now) {
- taginfo->expectedNextCheckin = now + 1800;
+ taginfo->expectedNextCheckin = now + 60;
}
taginfo->pendingCount = 0;
taginfo->alias = tag["alias"].as();
@@ -280,11 +280,11 @@ uint32_t getTagCount(uint32_t& timeoutcount, uint32_t& lowbattcount) {
if (!taginfo->isExternal) tagcount++;
const int32_t timeout = now - taginfo->lastseen;
if (taginfo->expectedNextCheckin < 3600) {
- // not initialised, timeout if not seen last 10 minutes
- if (timeout > 600) timeoutcount++;
- } else if (now - taginfo->expectedNextCheckin > 600) {
- // expected checkin is behind, timeout if not seen last 10 minutes
- if (timeout > 600) timeoutcount++;
+ // not initialised, timeout if not seen last 5 minutes
+ if (timeout > config.maxsleep * 60 + 300) timeoutcount++;
+ } else if (now - static_cast(taginfo->expectedNextCheckin) > 600) {
+ // expected checkin is behind, timeout if not seen last 5 minutes
+ if (timeout > config.maxsleep * 60 + 300) timeoutcount++;
}
if (taginfo->batteryMv < 2400 && taginfo->batteryMv != 0 && taginfo->batteryMv != 1337) lowbattcount++;
}
@@ -335,8 +335,9 @@ void initAPconfig() {
config.sleepTime2 = APconfig["sleeptime2"].is() ? APconfig["sleeptime2"] : 0;
config.ble = APconfig["ble"].is() ? APconfig["ble"] : 0;
config.discovery = APconfig["discovery"].is() ? APconfig["discovery"] : 0;
+ config.showtimestamp = APconfig["showtimestamp"].is() ? APconfig["showtimestamp"] : 0;
#ifdef BLE_ONLY
- config.ble = true;
+ config.ble = true;
#endif
// default wifi power 8.5 dbM
// see https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/src/WiFiGeneric.h#L111
@@ -373,6 +374,7 @@ void saveAPconfig() {
APconfig["repo"] = config.repo;
APconfig["env"] = config.env;
APconfig["discovery"] = config.discovery;
+ APconfig["showtimestamp"] = config.showtimestamp;
serializeJsonPretty(APconfig, configFile);
configFile.close();
xSemaphoreGive(fsMutex);
diff --git a/ESP32_AP-Flasher/src/web.cpp b/ESP32_AP-Flasher/src/web.cpp
index 19d29577..440c4d90 100644
--- a/ESP32_AP-Flasher/src/web.cpp
+++ b/ESP32_AP-Flasher/src/web.cpp
@@ -634,6 +634,9 @@ void init_web() {
if (request->hasParam("discovery", true)) {
config.discovery = static_cast(request->getParam("discovery", true)->value().toInt());
}
+ if (request->hasParam("showtimestamp", true)) {
+ config.showtimestamp = static_cast(request->getParam("showtimestamp", true)->value().toInt());
+ }
if (request->hasParam("repo", true)) {
config.repo = request->getParam("repo", true)->value();
}
diff --git a/ESP32_AP-Flasher/wwwroot/index.html b/ESP32_AP-Flasher/wwwroot/index.html
index 6360e21b..8f5438b3 100644
--- a/ESP32_AP-Flasher/wwwroot/index.html
+++ b/ESP32_AP-Flasher/wwwroot/index.html
@@ -290,24 +290,24 @@ options:
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/ESP32_AP-Flasher/wwwroot/main.js b/ESP32_AP-Flasher/wwwroot/main.js
index a7c24ba4..9d2d942d 100644
--- a/ESP32_AP-Flasher/wwwroot/main.js
+++ b/ESP32_AP-Flasher/wwwroot/main.js
@@ -375,7 +375,7 @@ function processTags(tagArray) {
if (element.nextcheckin > 1672531200) {
div.dataset.nextcheckin = element.nextcheckin;
} else {
- div.dataset.nextcheckin = element.lastseen + 1800;
+ div.dataset.nextcheckin = element.lastseen + 60;
}
div.style.opacity = '1';
@@ -461,7 +461,7 @@ function updatecards() {
if (item.dataset.lastseen && item.dataset.lastseen > (Date.now() / 1000) - servertimediff - 30 * 24 * 3600 * 60) {
let idletime = (Date.now() / 1000) - servertimediff - item.dataset.lastseen;
$('#tag' + tagmac + ' .lastseen').innerHTML = "last seen" + displayTime(Math.floor(idletime)) + " ago";
- if ((Date.now() / 1000) - servertimediff - 600 > item.dataset.nextcheckin) {
+ if ((Date.now() / 1000) - servertimediff - apConfig.maxsleep * 60 - 300 > item.dataset.nextcheckin) {
$('#tag' + tagmac + ' .warningicon').style.display = 'inline-block';
$('#tag' + tagmac).classList.remove("tagpending")
$('#tag' + tagmac).style.background = '#e0e0a0';
@@ -793,6 +793,7 @@ document.addEventListener("loadTab", function (event) {
$("#apcnight1").value = data.sleeptime1;
$("#apcnight2").value = data.sleeptime2;
$("#apcdiscovery").value = data.discovery;
+ $("#apcshowtimestamp").value = data.showtimestamp;
}
})
$('#apcfgmsg').innerHTML = '';
@@ -830,7 +831,8 @@ $('#apcfgsave').onclick = function () {
formData.append('timezone', $('#apctimezone').value);
formData.append('sleeptime1', $('#apcnight1').value);
formData.append('sleeptime2', $('#apcnight2').value);
- formData.append('discovery', $('#apcdiscovery').value)
+ formData.append('discovery', $('#apcdiscovery').value);
+ formData.append('showtimestamp', $('#apcshowtimestamp').value);
fetch("save_apcfg", {
method: "POST",
body: formData
@@ -1788,14 +1790,24 @@ function populateAPInfo(apip) {
})
.then(data => {
if (data.env) {
+ let gModuleType = "";
+ if (data.hasC6 == 1) {
+ gModuleType = "esp32-C6";
+ }
+ if (data.hasH2 == 1) {
+ gModuleType = "esp32-H2";
+ }
+ if (data.hasTslr == 1) {
+ gModuleType = "TSLR";
+ }
let version = '';
version += `env: ${data.env}
`;
version += `build date: ${formatEpoch(data.buildtime)}
`;
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()}
`;
+ if (gModuleType) {
+ version += `${gModuleType} version: 0x${parseInt(data.ap_version).toString(16).toUpperCase()}
`;
}
$('#ap' + apid + ' .apswversion').innerHTML = version;
}