From 5c521d300a58c5dcea125359045e5f9a1b26cc78 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:10:30 +0100 Subject: [PATCH] Add gpioviewer startup delay --- .../tasmota_xdrv_driver/xdrv_121_gpioviewer.ino | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino b/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino index 8402ea149..f45e5ae3d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino @@ -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 = "" "" @@ -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; }