From 36280ae2e32c3cecab68e90b872779c0a00ffaf5 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 11 Oct 2024 22:09:14 +0700 Subject: [PATCH] library update --- platformio.ini | 2 +- src/main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 37f48db..4f159e2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,6 +12,6 @@ platform = espressif32 board = wt32-eth01 framework = arduino -lib_deps = siwats/ESPMegaPROR3@^2.9.5 +lib_deps = siwats/ESPMegaPROR3@^2.9.7 monitor_speed = 115200 build_flags = -DCORE_DEBUG_LEVEL=0 -DSW_VERSION='"walkway-1.0.0"' -DBOARD_MODEL='"ESPMegaPRO R3.3c"' \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index dc43884..b89333e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,8 +18,9 @@ void setup() ESP_LOGD("OS", "Binding Ethernet Interface"); espmega.iot->bindEthernetInterface(Ð); // Connect to Network - ESP_LOGV("OS", "Connecting to Network"); + ESP_LOGV("OS", "Loading Network Config"); espmega.iot->loadNetworkConfig(); + ESP_LOGV("OS", "Connecting to Network"); espmega.iot->connectNetwork(); // Connect to the MQTT Broker ESP_LOGV("OS", "Connecting to MQTT Broker"); @@ -42,5 +43,6 @@ void loop() void input_callback(uint8_t pin, uint8_t state) { + if(state!=1) return; espmega.outputs.toggleState(pin); } \ No newline at end of file