From cc3c17dfb2547fd57f32015adb0a974839565d34 Mon Sep 17 00:00:00 2001 From: Yuri Trikoz Date: Wed, 24 Jun 2020 02:11:08 +0300 Subject: [PATCH] Serial --- include/Global.h | 1 + src/Cmd.cpp | 6 ++++++ src/main.cpp | 3 +++ 3 files changed, 10 insertions(+) diff --git a/include/Global.h b/include/Global.h index da313a07..ab5ca375 100644 --- a/include/Global.h +++ b/include/Global.h @@ -255,6 +255,7 @@ extern void do_mqtt_send_settings_to_udp(); extern void Web_server_init(); // iot_firmware +extern void loopSerial(); extern void loopCmd(); extern void loopButton(); extern void loopScenario(); diff --git a/src/Cmd.cpp b/src/Cmd.cpp index efd49206..cd8d7c97 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -250,6 +250,12 @@ void switch_() { but[switch_number.toInt()] = true; } +void loopSerial() { + if (term) { + term->loop(); + } +} + void loopButton() { static uint8_t switch_number = 1; diff --git a/src/main.cpp b/src/main.cpp index a2d77deb..67b3fb9a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -93,6 +93,9 @@ void loop() { #ifdef UDP_ENABLED loopUdp(); #endif + + loopSerial(); + ts.update(); }