Browse Source

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

Tim Koster 12 years ago
parent
commit
61db046b32
4 changed files with 8 additions and 1 deletions
  1. 1
    0
      Marlin/BlinkM.cpp
  2. 4
    0
      Marlin/BlinkM.h
  3. 1
    1
      Marlin/Configuration.h
  4. 2
    0
      Marlin/Marlin_main.cpp

+ 1
- 0
Marlin/BlinkM.cpp View File

7
 #else
7
 #else
8
   # include "WProgram.h"
8
   # include "WProgram.h"
9
 #endif
9
 #endif
10
+
10
 #include "BlinkM.h"
11
 #include "BlinkM.h"
11
 
12
 
12
 void SendColors(byte red, byte grn, byte blu)
13
 void SendColors(byte red, byte grn, byte blu)

+ 4
- 0
Marlin/BlinkM.h View File

8
   # include "WProgram.h"
8
   # include "WProgram.h"
9
 #endif
9
 #endif
10
 
10
 
11
+#ifndef BLINKM
12
+#define BLINKM
13
+
11
 #include "Wire.h"
14
 #include "Wire.h"
12
 
15
 
13
 void SendColors(byte red, byte grn, byte blu);
16
 void SendColors(byte red, byte grn, byte blu);
14
 
17
 
18
+#endif

+ 1
- 1
Marlin/Configuration.h View File

558
 //#define BARICUDA
558
 //#define BARICUDA
559
 
559
 
560
 //define BlinkM/CyzRgb Support
560
 //define BlinkM/CyzRgb Support
561
-//#define BlinkM
561
+//#define BLINKM
562
 
562
 
563
 /*********************************************************************\
563
 /*********************************************************************\
564
 * R/C SERVO support
564
 * R/C SERVO support

+ 2
- 0
Marlin/Marlin_main.cpp View File

1617
       #endif
1617
       #endif
1618
       break;
1618
       break;
1619
       //TODO: update for all axis, use for loop
1619
       //TODO: update for all axis, use for loop
1620
+    #ifdef BLINKM  
1620
     case 150: // M150
1621
     case 150: // M150
1621
       {
1622
       {
1622
         byte red;
1623
         byte red;
1630
         SendColors(red,grn,blu);        
1631
         SendColors(red,grn,blu);        
1631
       }
1632
       }
1632
       break;
1633
       break;
1634
+    #endif //BLINKM
1633
     case 201: // M201
1635
     case 201: // M201
1634
       for(int8_t i=0; i < NUM_AXIS; i++)
1636
       for(int8_t i=0; i < NUM_AXIS; i++)
1635
       {
1637
       {

Loading…
Cancel
Save