From a8a5e036f52b0f6b2426458d38f16b8d6214815b Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 9 Jun 2020 10:35:06 -0700 Subject: [PATCH] turn off serial debug output once we are using the protocol on the stream --- src/SerialConsole.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/SerialConsole.cpp b/src/SerialConsole.cpp index 6fc014a5c..683886ed5 100644 --- a/src/SerialConsole.cpp +++ b/src/SerialConsole.cpp @@ -27,11 +27,8 @@ void SerialConsole::init() */ void SerialConsole::handleToRadio(const uint8_t *buf, size_t len) { - // Note: for the time being we could _allow_ debug printing to keep going out the console - // I _think_ this is okay because we currently only print debug msgs from loop() and we are only - // dispatching serial protobuf msgs from loop() as well. When things are more threaded in the future this - // will need to change. - // setDestination(&noopPrint); + // Turn off debug serial printing once the API is activated, because other threads could print and corrupt packets + setDestination(&noopPrint); canWrite = true; StreamAPI::handleToRadio(buf, len);