diff --git a/platformio.ini b/platformio.ini index e027922..60aa049 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,7 +15,7 @@ board = wt32-eth01 framework = arduino lib_deps = siwats/ESPMegaPROR3@^2.9.4 monitor_speed = 115200 -build_flags = -DCORE_DEBUG_LEVEL=0 -DSW_VERSION='"cud-3.0.3-duct"' -DBOARD_MODEL='"ESPMegaPRO R3.3c"' -DAC_TYPE=AC_TYPE_DUCTED +build_flags = -DCORE_DEBUG_LEVEL=0 -DSW_VERSION='"cud-3.0.4-duct"' -DBOARD_MODEL='"ESPMegaPRO R3.3c"' -DAC_TYPE=AC_TYPE_DUCTED ; Ceiling A/C Variant (and newer ducted models) [env:satitm-ceiling] @@ -24,4 +24,4 @@ board = wt32-eth01 framework = arduino lib_deps = siwats/ESPMegaPROR3@^2.9.4 monitor_speed = 115200 -build_flags = -DCORE_DEBUG_LEVEL=0 -DSW_VERSION='"cud-3.0.3-ceiling"' -DBOARD_MODEL='"ESPMegaPRO R3.3c"' -DAC_TYPE=AC_TYPE_CEILING \ No newline at end of file +build_flags = -DCORE_DEBUG_LEVEL=0 -DSW_VERSION='"cud-3.0.4-ceiling"' -DBOARD_MODEL='"ESPMegaPRO R3.3c"' -DAC_TYPE=AC_TYPE_CEILING \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index b401de5..25a22bb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,6 +62,7 @@ void setup() // Set Pin 0 - 15 value to 4095 for (uint8_t i = 0; i < 16; i++) espmega.outputs.setValue(i,4095); + // Initialize IoT Modules ESP_LOGV("CUD IoT OS", "Initializing IoT Modules"); espmega.setTimezone("ICT-7"); @@ -106,7 +107,7 @@ void setup() // This pre-load the input buffers // We need to do this to prevent switches that are left on the "on" position from triggering the callback ESP_LOGV("CUD IoT OS", "Pre-loading input buffers"); - espmega.inputs.loop(); + espmega.inputs.preloadInputBuffers(); espmega.inputs.registerCallback(handle_input_change); // Start the display routine ESP_LOGV("CUD IoT OS", "Starting CUDDisplay");