change preload action

This commit is contained in:
Siwat Sirichai 2024-06-28 21:28:29 -07:00
parent c4691c62be
commit 04a9a49875
2 changed files with 4 additions and 3 deletions

View file

@ -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");