From 6217195248a0537092dc2f52a851819dd1ed0796 Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Mon, 5 Sep 2022 12:37:57 +0100 Subject: [PATCH] update - Added debug-mode support - to disable DebugOutput change debug_mode to 0 --- ESP/platformio.ini | 5 +++++ ESP/src/main.cpp | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ESP/platformio.ini b/ESP/platformio.ini index 7a603a5..1e4c350 100644 --- a/ESP/platformio.ini +++ b/ESP/platformio.ini @@ -11,6 +11,9 @@ [platformio] default_envs = esp32Cam ; do not change this value +[debug_mode] +debug_mode = 1 ; 0 = off, 1 = on + ; The below options are available for all environments ; The ssid and password are requried for the trackers to connect to your network!!! [wifi] @@ -85,6 +88,8 @@ build_flags = -DADHOC_CHANNEL=${wifi.adhocChannel} ; -DWIFI_CHANNEL=${wifi.channel} ; + + -DDEBUG_MODE=${debug_mode.debug_mode} ; Set the debug mode '-DMDNS_TRACKER_NAME="OpenIrisTracker"' ; Set the tracker name - The string literal tells platformio to include the quatations in the string - making sure that the compiler sees the string as a cstring diff --git a/ESP/src/main.cpp b/ESP/src/main.cpp index 46212f4..1e4b23e 100644 --- a/ESP/src/main.cpp +++ b/ESP/src/main.cpp @@ -8,8 +8,7 @@ #include #include #include -//#include // Basic Serial Manager -//#include // Serial Manager #include @@ -29,7 +28,7 @@ StreamServer streamServer(STREAM_SERVER_PORT); void setup() { Serial.begin(115200); - Serial.setDebugOutput(true); + Serial.setDebugOutput(DEBUG_MODE); Serial.println("\n"); Logo::printASCII();