Browse Source

Added #ifdef BLINKM around new code. Also refined BlinkM.h.

pull/1/head
Tim Koster 11 years ago
parent
commit
61db046b32
  1. 1
      Marlin/BlinkM.cpp
  2. 4
      Marlin/BlinkM.h
  3. 2
      Marlin/Configuration.h
  4. 2
      Marlin/Marlin_main.cpp

1
Marlin/BlinkM.cpp

@ -7,6 +7,7 @@
#else #else
# include "WProgram.h" # include "WProgram.h"
#endif #endif
#include "BlinkM.h" #include "BlinkM.h"
void SendColors(byte red, byte grn, byte blu) void SendColors(byte red, byte grn, byte blu)

4
Marlin/BlinkM.h

@ -8,7 +8,11 @@
# include "WProgram.h" # include "WProgram.h"
#endif #endif
#ifndef BLINKM
#define BLINKM
#include "Wire.h" #include "Wire.h"
void SendColors(byte red, byte grn, byte blu); void SendColors(byte red, byte grn, byte blu);
#endif

2
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 BARICUDA
//define BlinkM/CyzRgb Support //define BlinkM/CyzRgb Support
//#define BlinkM //#define BLINKM
/*********************************************************************\ /*********************************************************************\
* R/C SERVO support * R/C SERVO support

2
Marlin/Marlin_main.cpp

@ -1617,6 +1617,7 @@ void process_commands()
#endif #endif
break; break;
//TODO: update for all axis, use for loop //TODO: update for all axis, use for loop
#ifdef BLINKM
case 150: // M150 case 150: // M150
{ {
byte red; byte red;
@ -1630,6 +1631,7 @@ void process_commands()
SendColors(red,grn,blu); SendColors(red,grn,blu);
} }
break; break;
#endif //BLINKM
case 201: // M201 case 201: // M201
for(int8_t i=0; i < NUM_AXIS; i++) for(int8_t i=0; i < NUM_AXIS; i++)
{ {

Loading…
Cancel
Save