diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-06-10 18:41:09 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-06-10 18:41:24 +0200 |
commit | fba17464f5cd5c8f9fb8eb8c9c9bd5947489df69 (patch) | |
tree | f75202af53cb2bdae06afcad733e4b1d54537382 /Venus_Skeleton/Venus_Skeleton.ino | |
parent | 0185ca207cf25b3621b40ee35718e1decdd5fa08 (diff) | |
download | code-fba17464f5cd5c8f9fb8eb8c9c9bd5947489df69.tar.gz |
Integrate serial printing
Diffstat (limited to 'Venus_Skeleton/Venus_Skeleton.ino')
-rw-r--r-- | Venus_Skeleton/Venus_Skeleton.ino | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Venus_Skeleton/Venus_Skeleton.ino b/Venus_Skeleton/Venus_Skeleton.ino index 5873726..f15848d 100644 --- a/Venus_Skeleton/Venus_Skeleton.ino +++ b/Venus_Skeleton/Venus_Skeleton.ino @@ -16,14 +16,6 @@ // 2 Error: Sensor Obstacle detection on the turret // 3 Error: Sensor IR Line detection -#define DEBUG true - -#ifdef DEBUG -#define DEBUG_PRINT(str) Serial.print(str) -#else -#define DEBUG_PRINT(str) do { } while (0) -#endif - #include <Servo.h> #include <HMC5883L.h> #include <Wire.h> @@ -41,6 +33,24 @@ #include "calibration_wall-e.h" //#include "calibration.eve.h" +#include "comm.h" + +// set 0 to disable debugging +// set 1 for debugging with Serial.print (default) +// set 2 for debugging over RPi serial +#ifndef DEBUG +# define DEBUG 1 +#endif + +#if DEBUG == 1 +# define DEBUG_PRINT(str) Serial.print(str) +#elif DEBUG == 2 +# define DEBUG_PRINT(str) serial_print_debug(str) +#else +# define DEBUG_PRINT(str) do { } while (0) +#endif + + // ***************** // ** DEFINITIONS ** |