diff --git a/platformio.ini b/platformio.ini index 1d508c33..b0e4d244 100644 --- a/platformio.ini +++ b/platformio.ini @@ -43,6 +43,7 @@ build_unflags = -std=gnu++11 build_flags = -std=c++17 -D TEENSY_OPT_SMALLEST_CODE + ; -D ENABLE_DEBUG_PRINTS check_tool = clangtidy check_src_filters = + diff --git a/src/main.cpp b/src/main.cpp index 51129cc5..c087dd20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,9 @@ +#ifdef ENABLE_DEBUG_PRINTS +#define DEBUG_PRINTS true +#else +#define DEBUG_PRINTS false +#endif + /* Include files */ /* System Includes*/ #include @@ -461,7 +467,7 @@ void loop() // Basic debug prints // if (curr_tick.triggers.trigger5) - if (false) + if (DEBUG_PRINTS) { Serial.print("Steering system reported angle (deg): "); Serial.println(steering_system.getSteeringSystemData().angle);