Skip to content

Commit

Permalink
added compiler macro flag for debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
RCMast3r committed Sep 29, 2024
1 parent 03ccfbb commit 19650a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
+<include/*>
Expand Down
8 changes: 7 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#ifdef ENABLE_DEBUG_PRINTS
#define DEBUG_PRINTS true
#else
#define DEBUG_PRINTS false
#endif

/* Include files */
/* System Includes*/
#include <Arduino.h>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 19650a3

Please sign in to comment.