fix(client): add serial mute during ID? response
This commit is contained in:
parent
ae5028503f
commit
3c6b378b9b
1 changed files with 16 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue