From 61db046b3285c56dea66e658d9b8530debaf63a1 Mon Sep 17 00:00:00 2001 From: Tim Koster Date: Fri, 20 Sep 2013 10:57:42 +0300 Subject: [PATCH] Added #ifdef BLINKM around new code. Also refined BlinkM.h. --- Marlin/BlinkM.cpp | 1 + Marlin/BlinkM.h | 4 ++++ Marlin/Configuration.h | 2 +- Marlin/Marlin_main.cpp | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Marlin/BlinkM.cpp b/Marlin/BlinkM.cpp index 15a2527bbf..7b8a7867c2 100644 --- a/Marlin/BlinkM.cpp +++ b/Marlin/BlinkM.cpp @@ -7,6 +7,7 @@ #else # include "WProgram.h" #endif + #include "BlinkM.h" void SendColors(byte red, byte grn, byte blu) diff --git a/Marlin/BlinkM.h b/Marlin/BlinkM.h index 5136828782..fbb9399c23 100644 --- a/Marlin/BlinkM.h +++ b/Marlin/BlinkM.h @@ -8,7 +8,11 @@ # include "WProgram.h" #endif +#ifndef BLINKM +#define BLINKM + #include "Wire.h" void SendColors(byte red, byte grn, byte blu); +#endif diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 195331252f..d3168b5450 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -558,7 +558,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //#define BARICUDA //define BlinkM/CyzRgb Support -//#define BlinkM +//#define BLINKM /*********************************************************************\ * R/C SERVO support diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 26fbd41232..7ecf6032c8 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1617,6 +1617,7 @@ void process_commands() #endif break; //TODO: update for all axis, use for loop + #ifdef BLINKM case 150: // M150 { byte red; @@ -1630,6 +1631,7 @@ void process_commands() SendColors(red,grn,blu); } break; + #endif //BLINKM case 201: // M201 for(int8_t i=0; i < NUM_AXIS; i++) {