From 3c6b378b9b20f271e00806ebf0efa6c65c5c5876 Mon Sep 17 00:00:00 2001 From: eddy Date: Tue, 4 Aug 2026 19:03:54 +0200 Subject: [PATCH] fix(client): add serial mute during ID? response --- src/client.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/client.cpp b/src/client.cpp index 4a85039..3d4298c 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -13,6 +13,18 @@ static const char *TAG = "client"; +static bool serialMuted = false; + +static void muteSerial() { + serialMuted = true; + esp_log_level_set("*", ESP_LOG_NONE); +} + +static void unmuteSerial() { + serialMuted = false; + esp_log_level_set("*", CONFIG_LOG_DEFAULT_LEVEL); +} + #define TOUCH1_PIN 8 #define TOUCH2_PIN 6 #define BUTTON_PIN 41 @@ -423,7 +435,11 @@ void loop() { Serial.println("NO_KEY"); } } else if (serialBuf == "ID?") { + Serial.flush(); + muteSerial(); Serial.println("SylDa_Client"); + delay(50); + unmuteSerial(); } else if (serialBuf == "VERSION?") { Serial.print("BUILD_NR:"); Serial.println(FIRMWARE_VERSION_CLIENT);