From 5365ebf8ec894c796a726414281411cfdf9f5ced Mon Sep 17 00:00:00 2001 From: elmo128 <60213508+elmo128@users.noreply.github.com> Date: Tue, 12 Sep 2023 04:06:01 +0200 Subject: [PATCH] baud rate set by build flag, if available --- src/NerdMinerV2.ino.cpp | 7 ++++++- src/wManager.cpp | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/NerdMinerV2.ino.cpp b/src/NerdMinerV2.ino.cpp index 94e802f..5c0e4a7 100644 --- a/src/NerdMinerV2.ino.cpp +++ b/src/NerdMinerV2.ino.cpp @@ -38,7 +38,12 @@ const char* ntpServer = "pool.ntp.org"; /********* INIT *****/ void setup() { - Serial.begin(115200); +#ifdef MONITOR_SPEED + Serial.begin(MONITOR_SPEED); +#else + Serial.begin(115200); +#endif //MONITOR_SPEED + Serial.setTimeout(0); delay(100); diff --git a/src/wManager.cpp b/src/wManager.cpp index 51b5d27..4248f05 100644 --- a/src/wManager.cpp +++ b/src/wManager.cpp @@ -135,7 +135,11 @@ void configModeCallback(WiFiManager *myWiFiManager) void init_WifiManager() { - Serial.begin(115200); +#ifdef MONITOR_SPEED + Serial.begin(MONITOR_SPEED); +#else + Serial.begin(115200); +#endif //MONITOR_SPEED //Serial.setTxTimeoutMs(10); //Init pin 15 to eneble 5V external power (LilyGo bug)