Add gpioviewer startup delay

This commit is contained in:
Theo Arends 2024-01-07 18:10:30 +01:00
parent 3320847237
commit 5c521d300a

View File

@ -18,10 +18,10 @@
#define GV_PORT 5557
#define GV_SAMPLING_INTERVAL 100 // Relates to FUNC_EVERY_100_MSECOND
const char *GVRelease = "1.0.7";
#define GV_BASE_URL "https://thelastoutpostworkshop.github.io/microcontroller_devkit/gpio_viewer/assets/"
const char *GVRelease = "1.0.7";
const char HTTP_GV_PAGE[] PROGMEM =
"<!DOCTYPE HTML>"
"<html>"
@ -280,8 +280,14 @@ bool Xdrv121(uint32_t function) {
switch (function) {
case FUNC_EVERY_SECOND:
if (!TasmotaGlobal.global_state.network_down) {
GVBegin();
GV.active = true;
// Add delay to finish network setup
static uint32_t gv_delay = 3;
if (gv_delay) {
gv_delay--;
} else {
GVBegin();
GV.active = true;
}
}
break;
}