Browse Source

Merge pull request #7038 from thinkyhead/bf_PCA9632

PCA9632 PWM color LED support
Scott Lahteine 7 years ago
parent
commit
4414825e0d
36 changed files with 351 additions and 202 deletions
  1. 32
    106
      .travis.yml
  2. 2
    2
      Marlin/Conditionals_LCD.h
  3. 4
    1
      Marlin/Configuration.h
  4. 46
    57
      Marlin/Marlin_main.cpp
  5. 2
    6
      Marlin/SanityCheck.h
  6. 4
    1
      Marlin/example_configurations/CL-260/Configuration.h
  7. 4
    1
      Marlin/example_configurations/Cartesio/Configuration.h
  8. 4
    1
      Marlin/example_configurations/Felix/Configuration.h
  9. 4
    1
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  10. 4
    1
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h
  11. 4
    1
      Marlin/example_configurations/Hephestos/Configuration.h
  12. 4
    1
      Marlin/example_configurations/Hephestos_2/Configuration.h
  13. 4
    1
      Marlin/example_configurations/K8200/Configuration.h
  14. 4
    1
      Marlin/example_configurations/K8400/Configuration.h
  15. 4
    1
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  16. 4
    1
      Marlin/example_configurations/M150/Configuration.h
  17. 4
    1
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  18. 4
    1
      Marlin/example_configurations/RigidBot/Configuration.h
  19. 4
    1
      Marlin/example_configurations/SCARA/Configuration.h
  20. 4
    1
      Marlin/example_configurations/TAZ4/Configuration.h
  21. 4
    1
      Marlin/example_configurations/TinyBoy2/Configuration.h
  22. 4
    1
      Marlin/example_configurations/WITBOX/Configuration.h
  23. 4
    1
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  24. 4
    1
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  25. 4
    1
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  26. 4
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  27. 4
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  28. 4
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  29. 4
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  30. 4
    1
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h
  31. 4
    1
      Marlin/example_configurations/makibox/Configuration.h
  32. 4
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  33. 4
    1
      Marlin/example_configurations/wt150/Configuration.h
  34. 115
    0
      Marlin/pca9632.cpp
  35. 36
    0
      Marlin/pca9632.h
  36. 2
    2
      Marlin/ultralcd_impl_HD44780.h

+ 32
- 106
.travis.yml View File

@@ -71,48 +71,15 @@ script:
71 71
   #
72 72
   - build_marlin
73 73
   #
74
-  # Test heated bed temperature sensor
75
-  #
76
-  - opt_set TEMP_SENSOR_BED 1
77
-  - build_marlin
78
-  #
79
-  # Test 2 extruders on basic RAMPS 1.4
74
+  # Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
75
+  #  plus a "Fix Mounted" Probe with Safe Homing
80 76
   #
81 77
   - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
82 78
   - opt_set EXTRUDERS 2
79
+  - opt_set TEMP_SENSOR_0 -2
83 80
   - opt_set TEMP_SENSOR_1 1
84
-  - build_marlin
85
-  #
86
-  # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
87
-  # Include a test for LIN_ADVANCE here also
88
-  #
89
-  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
90
-  - opt_set EXTRUDERS 5
91
-  - opt_set TEMP_SENSOR_1 1
92
-  - opt_set TEMP_SENSOR_2 5
93
-  - opt_set TEMP_SENSOR_3 20
94
-  - opt_set TEMP_SENSOR_4 999
95 81
   - opt_set TEMP_SENSOR_BED 1
96
-  - opt_enable_adv LIN_ADVANCE
97
-  - build_marlin
98
-  #
99
-  # Test PIDTEMPBED
100
-  #
101
-  - restore_configs
102
-  - opt_set TEMP_SENSOR_BED 1
103
-  - opt_enable PIDTEMPBED
104
-  - build_marlin
105
-  #
106
-  # Test MAX6675
107
-  #
108
-  - restore_configs
109
-  - opt_set TEMP_SENSOR_0 -2
110
-  - build_marlin
111
-  #
112
-  # Test a "Fix Mounted" Probe along with Safe Homing
113
-  #
114
-  - restore_configs
115
-  - opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING
82
+  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING
116 83
   - build_marlin
117 84
   #
118 85
   # ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, and DEBUG_LEVELING_FEATURE
@@ -151,17 +118,27 @@ script:
151 118
   - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
152 119
   - build_marlin
153 120
   #
154
-  # Test PROBE_MANUALLY feature, with LCD support
121
+  # Test PROBE_MANUALLY feature, with LCD support,
122
+  #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
123
+  #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
155 124
   #
156 125
   - restore_configs
126
+  - opt_set MOTHERBOARD BOARD_MINIRAMBO
157 127
   - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR LCD_BED_LEVELING ULTIMAKERCONTROLLER
128
+  - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
158 129
   - build_marlin
159 130
   #
160
-  # Test EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
161
-  #   INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
131
+  # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
132
+  # Include a test for LIN_ADVANCE here also
162 133
   #
163
-  - restore_configs
164
-  - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
134
+  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
135
+  - opt_set EXTRUDERS 5
136
+  - opt_set TEMP_SENSOR_1 1
137
+  - opt_set TEMP_SENSOR_2 5
138
+  - opt_set TEMP_SENSOR_3 20
139
+  - opt_set TEMP_SENSOR_4 999
140
+  - opt_set TEMP_SENSOR_BED 1
141
+  - opt_enable_adv LIN_ADVANCE
165 142
   - build_marlin
166 143
   #
167 144
   # Mixing Extruder with 5 steppers
@@ -202,34 +179,19 @@ script:
202 179
   - build_marlin
203 180
   #
204 181
   # Test MINIRAMBO for PWM_MOTOR_CURRENT
182
+  #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
183
+  #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
184
+  #      Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
185
+  #      FILAMENT_CHANGE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
205 186
   #
206 187
   - restore_configs
207
-  - opt_set MOTHERBOARD BOARD_MINIRAMBO
208
-  - build_marlin
209
-  #
210
-  # Test FILAMENT_CHANGE_FEATURE, PARK_HEAD_ON_PAUSE, and LCD_INFO_MENU
211
-  #
212
-  - restore_configs
213
-  - opt_enable ULTIMAKERCONTROLLER
214
-  - opt_enable_adv FILAMENT_CHANGE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
215
-  - build_marlin
216
-  #
217
-  # Enable filament sensor
218
-  #
219
-  - restore_configs
220
-  - opt_enable FILAMENT_WIDTH_SENSOR
221
-  - build_marlin
222
-  #
223
-  # Enable filament sensor with LCD display
224
-  #
225
-  - opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY
226
-  - build_marlin
227
-  #
228
-  # Enable BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS, and I2C_SLAVE_ADDRESS
229
-  #
230
-  - restore_configs
231
-  - opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
188
+  - opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR SDSUPPORT
189
+  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632
190
+  - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
232 191
   - opt_set_adv I2C_SLAVE_ADDRESS 63
192
+  - opt_enable_adv FILAMENT_CHANGE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
193
+  - pins_set RAMPS X_MAX_PIN -1
194
+  - opt_set_adv Z2_MAX_PIN 2
233 195
   - build_marlin
234 196
   #
235 197
   # Enable COREXY
@@ -244,34 +206,8 @@ script:
244 206
   - opt_enable COREYX
245 207
   - build_marlin
246 208
   #
247
-  # Enable Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS
248
-  #
249
-  - restore_configs
250
-  - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
251
-  - pins_set RAMPS X_MAX_PIN -1
252
-  - opt_set_adv Z2_MAX_PIN 2
253
-  - build_marlin
254
-  #
255
-  # Test PRINTCOUNTER
256
-  #
257
-  - restore_configs
258
-  - opt_enable PRINTCOUNTER
259
-  - build_marlin
260
-  #
261
-  # Test NOZZLE_PARK_FEATURE
262
-  #
263
-  - restore_configs
264
-  - opt_enable NOZZLE_PARK_FEATURE
265
-  - build_marlin
266
-  #
267
-  # Test NOZZLE_CLEAN_FEATURE
268
-  #
269
-  - restore_configs
270
-  - opt_enable NOZZLE_CLEAN_FEATURE
271
-  - build_marlin
272 209
   #
273
-  #
274
-  ######## STANDARD LCD/PANELS ##############
210
+  ######## Other Standard LCD/Panels ##############
275 211
   #
276 212
   # ULTRA_LCD
277 213
   #
@@ -285,12 +221,6 @@ script:
285 221
   - opt_enable DOGLCD
286 222
   - build_marlin
287 223
   #
288
-  # ULTIMAKERCONTROLLER
289
-  #
290
-  - restore_configs
291
-  - opt_enable ULTIMAKERCONTROLLER
292
-  - build_marlin
293
-  #
294 224
   # MAKRPANEL
295 225
   # Needs to use Melzi and Sanguino hardware
296 226
   #
@@ -304,15 +234,11 @@ script:
304 234
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING
305 235
   - build_marlin
306 236
   #
307
-  # G3D_PANEL
237
+  # G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
308 238
   #
309 239
   - restore_configs
310 240
   - opt_enable G3D_PANEL SDSUPPORT
311
-  - build_marlin
312
-  #
313
-  # Add SDCARD_SORT_ALPHA, test G3D_PANEL again
314
-  #
315
-  - opt_enable_adv SDCARD_SORT_ALPHA
241
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
316 242
   - opt_set_adv SDSORT_GCODE true
317 243
   - opt_set_adv SDSORT_USES_RAM true
318 244
   - opt_set_adv SDSORT_USES_STACK true

+ 2
- 2
Marlin/Conditionals_LCD.h View File

@@ -245,7 +245,7 @@
245 245
     #define LCD_DEGREE_CHAR      0x01
246 246
     #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
247 247
     #define LCD_UPLEVEL_CHAR     0x03
248
-    #define LCD_REFRESH_CHAR     0x04
248
+    #define LCD_STR_REFRESH     "\x04"
249 249
     #define LCD_STR_FOLDER      "\x05"
250 250
     #define LCD_FEEDRATE_CHAR    0x06
251 251
     #define LCD_CLOCK_CHAR       0x07
@@ -398,6 +398,6 @@
398 398
 
399 399
   #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
400 400
   #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
401
-  #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED))
401
+  #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632))
402 402
 
403 403
 #endif // CONDITIONALS_LCD_H

+ 4
- 1
Marlin/Configuration.h View File

@@ -1482,6 +1482,9 @@
1482 1482
 //define BlinkM/CyzRgb Support
1483 1483
 //#define BLINKM
1484 1484
 
1485
+//define PCA9632 PWM LED driver Support
1486
+//#define PCA9632
1487
+
1485 1488
 /**
1486 1489
  * RGB LED / LED Strip Control
1487 1490
  *
@@ -1519,7 +1522,7 @@
1519 1522
  *  - Change to green once print has finished
1520 1523
  *  - Turn off after the print has finished and the user has pushed a button
1521 1524
  */
1522
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1525
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1523 1526
   #define PRINTER_EVENT_LEDS
1524 1527
 #endif
1525 1528
 

+ 46
- 57
Marlin/Marlin_main.cpp View File

@@ -138,7 +138,7 @@
138 138
  * M140 - Set bed target temp. S<temp>
139 139
  * M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
140 140
  * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
141
- * M150 - Set Status LED Color as R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM or RGB_LED)
141
+ * M150 - Set Status LED Color as R<red> U<green> B<blue>. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, or PCA9632)
142 142
  * M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
143 143
  * M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
144 144
  * M164 - Save the mix as a virtual extruder. (Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS)
@@ -280,6 +280,10 @@
280 280
   #include "Wire.h"
281 281
 #endif
282 282
 
283
+#if ENABLED(PCA9632)
284
+  #include "pca9632.h"
285
+#endif
286
+
283 287
 #if HAS_SERVOS
284 288
   #include "servo.h"
285 289
 #endif
@@ -988,7 +992,9 @@ void servo_init() {
988 992
       // This variant uses i2c to send the RGB components to the device.
989 993
       SendColors(r, g, b);
990 994
 
991
-    #else
995
+    #endif
996
+
997
+    #if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
992 998
 
993 999
       // This variant uses 3 separate pins for the RGB components.
994 1000
       // If the pins can do PWM then their intensity will be set.
@@ -1005,6 +1011,11 @@ void servo_init() {
1005 1011
       #endif
1006 1012
 
1007 1013
     #endif
1014
+
1015
+    #if ENABLED(PCA9632)
1016
+      // Update I2C LED driver
1017
+      PCA9632_SetColor(r, g, b);
1018
+    #endif
1008 1019
   }
1009 1020
 
1010 1021
 #endif // HAS_COLOR_LEDS
@@ -3520,7 +3531,7 @@ inline void gcode_G4() {
3520 3531
       if (leveling_is_active()) {
3521 3532
         SERIAL_ECHOLNPGM(" (enabled)");
3522 3533
         #if ABL_PLANAR
3523
-          float diff[XYZ] = {
3534
+          const float diff[XYZ] = {
3524 3535
             stepper.get_axis_position_mm(X_AXIS) - current_position[X_AXIS],
3525 3536
             stepper.get_axis_position_mm(Y_AXIS) - current_position[Y_AXIS],
3526 3537
             stepper.get_axis_position_mm(Z_AXIS) - current_position[Z_AXIS]
@@ -5085,6 +5096,15 @@ void home_all_axes() { gcode_G28(true); }
5085 5096
      *
5086 5097
      *   E   Engage the probe for each point
5087 5098
      */
5099
+
5100
+    void print_signed_float(const char * const prefix, const float &f) {
5101
+      SERIAL_PROTOCOLPGM("  ");
5102
+      serialprintPGM(prefix);
5103
+      SERIAL_PROTOCOLCHAR(':');
5104
+      if (f >= 0) SERIAL_CHAR('+');
5105
+      SERIAL_PROTOCOL_F(f, 2);
5106
+    }
5107
+
5088 5108
     inline void gcode_G33() {
5089 5109
 
5090 5110
       const int8_t probe_points = parser.seen('P') ? parser.value_int() : DELTA_CALIBRATION_DEFAULT_POINTS;
@@ -5106,7 +5126,7 @@ void home_all_axes() { gcode_G28(true); }
5106 5126
       }
5107 5127
 
5108 5128
       const bool towers_set = !parser.seen('T'),
5109
-                 stow_after_each = parser.seen('E'),
5129
+                 stow_after_each      = parser.seen('E') && parser.value_bool(),
5110 5130
                  _1p_calibration      = probe_points == 1,
5111 5131
                  _4p_calibration      = probe_points == 2,
5112 5132
                  _4p_towers_points    = _4p_calibration && towers_set,
@@ -5174,25 +5194,16 @@ void home_all_axes() { gcode_G28(true); }
5174 5194
 
5175 5195
       SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5176 5196
       if (!_1p_calibration) {
5177
-        SERIAL_PROTOCOLPGM("    Ex:");
5178
-        if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5179
-        SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5180
-        SERIAL_PROTOCOLPGM("  Ey:");
5181
-        if (endstop_adj[B_AXIS] >= 0) SERIAL_CHAR('+');
5182
-        SERIAL_PROTOCOL_F(endstop_adj[B_AXIS], 2);
5183
-        SERIAL_PROTOCOLPGM("  Ez:");
5184
-        if (endstop_adj[C_AXIS] >= 0) SERIAL_CHAR('+');
5185
-        SERIAL_PROTOCOL_F(endstop_adj[C_AXIS], 2);
5197
+        print_signed_float(PSTR("  Ex"), endstop_adj[A_AXIS]);
5198
+        print_signed_float(PSTR("Ey"), endstop_adj[B_AXIS]);
5199
+        print_signed_float(PSTR("Ez"), endstop_adj[C_AXIS]);
5186 5200
         SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5187 5201
       }
5188 5202
       SERIAL_EOL();
5189 5203
       if (_7p_calibration && towers_set) {
5190
-        SERIAL_PROTOCOLPGM(".Tower angle :    Tx:");
5191
-        if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
5192
-        SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
5193
-        SERIAL_PROTOCOLPGM("  Ty:");
5194
-        if (delta_tower_angle_trim[B_AXIS] >= 0) SERIAL_CHAR('+');
5195
-        SERIAL_PROTOCOL_F(delta_tower_angle_trim[B_AXIS], 2);
5204
+        SERIAL_PROTOCOLPGM(".Tower angle :  ");
5205
+        print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
5206
+        print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
5196 5207
         SERIAL_PROTOCOLPGM("  Tz:+0.00");
5197 5208
         SERIAL_EOL();
5198 5209
       }
@@ -5342,19 +5353,12 @@ void home_all_axes() { gcode_G28(true); }
5342 5353
          // print report
5343 5354
 
5344 5355
         if (verbose_level != 1) {
5345
-          SERIAL_PROTOCOLPGM(".      c:");
5346
-          if (z_at_pt[0] > 0) SERIAL_CHAR('+');
5347
-          SERIAL_PROTOCOL_F(z_at_pt[0], 2);
5356
+          SERIAL_PROTOCOLPGM(".    ");
5357
+          print_signed_float(PSTR("c"), z_at_pt[0]);
5348 5358
           if (_4p_towers_points || _7p_calibration) {
5349
-            SERIAL_PROTOCOLPGM("     x:");
5350
-            if (z_at_pt[1] >= 0) SERIAL_CHAR('+');
5351
-            SERIAL_PROTOCOL_F(z_at_pt[1], 2);
5352
-            SERIAL_PROTOCOLPGM("   y:");
5353
-            if (z_at_pt[5] >= 0) SERIAL_CHAR('+');
5354
-            SERIAL_PROTOCOL_F(z_at_pt[5], 2);
5355
-            SERIAL_PROTOCOLPGM("   z:");
5356
-            if (z_at_pt[9] >= 0) SERIAL_CHAR('+');
5357
-            SERIAL_PROTOCOL_F(z_at_pt[9], 2);
5359
+            print_signed_float(PSTR("   x"), z_at_pt[1]);
5360
+            print_signed_float(PSTR(" y"), z_at_pt[5]);
5361
+            print_signed_float(PSTR(" z"), z_at_pt[9]);
5358 5362
           }
5359 5363
           if (!_4p_opposite_points) SERIAL_EOL();
5360 5364
           if ((_4p_opposite_points) || _7p_calibration) {
@@ -5362,15 +5366,9 @@ void home_all_axes() { gcode_G28(true); }
5362 5366
               SERIAL_CHAR('.');
5363 5367
               SERIAL_PROTOCOL_SP(13);
5364 5368
             }
5365
-            SERIAL_PROTOCOLPGM("    yz:");
5366
-            if (z_at_pt[7] >= 0) SERIAL_CHAR('+');
5367
-            SERIAL_PROTOCOL_F(z_at_pt[7], 2);
5368
-            SERIAL_PROTOCOLPGM("  zx:");
5369
-            if (z_at_pt[11] >= 0) SERIAL_CHAR('+');
5370
-            SERIAL_PROTOCOL_F(z_at_pt[11], 2);
5371
-            SERIAL_PROTOCOLPGM("  xy:");
5372
-            if (z_at_pt[3] >= 0) SERIAL_CHAR('+');
5373
-            SERIAL_PROTOCOL_F(z_at_pt[3], 2);
5369
+            print_signed_float(PSTR("  yz"), z_at_pt[7]);
5370
+            print_signed_float(PSTR("zx"), z_at_pt[11]);
5371
+            print_signed_float(PSTR("xy"), z_at_pt[3]);
5374 5372
             SERIAL_EOL();
5375 5373
           }
5376 5374
         }
@@ -5400,25 +5398,16 @@ void home_all_axes() { gcode_G28(true); }
5400 5398
           }
5401 5399
           SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
5402 5400
           if (!_1p_calibration) {
5403
-            SERIAL_PROTOCOLPGM("    Ex:");
5404
-            if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
5405
-            SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
5406
-            SERIAL_PROTOCOLPGM("  Ey:");
5407
-            if (endstop_adj[B_AXIS] >= 0) SERIAL_CHAR('+');
5408
-            SERIAL_PROTOCOL_F(endstop_adj[B_AXIS], 2);
5409
-            SERIAL_PROTOCOLPGM("  Ez:");
5410
-            if (endstop_adj[C_AXIS] >= 0) SERIAL_CHAR('+');
5411
-            SERIAL_PROTOCOL_F(endstop_adj[C_AXIS], 2);
5401
+            print_signed_float(PSTR("  Ex"), endstop_adj[A_AXIS]);
5402
+            print_signed_float(PSTR("Ey"), endstop_adj[B_AXIS]);
5403
+            print_signed_float(PSTR("Ez"), endstop_adj[C_AXIS]);
5412 5404
             SERIAL_PROTOCOLPAIR("    Radius:", delta_radius);
5413 5405
           }
5414 5406
           SERIAL_EOL();
5415 5407
           if (_7p_calibration && towers_set) {
5416
-            SERIAL_PROTOCOLPGM(".Tower angle :    Tx:");
5417
-            if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
5418
-            SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
5419
-            SERIAL_PROTOCOLPGM("  Ty:");
5420
-            if (delta_tower_angle_trim[B_AXIS] >= 0) SERIAL_CHAR('+');
5421
-            SERIAL_PROTOCOL_F(delta_tower_angle_trim[B_AXIS], 2);
5408
+            SERIAL_PROTOCOLPGM(".Tower angle :  ");
5409
+            print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
5410
+            print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
5422 5411
             SERIAL_PROTOCOLPGM("  Tz:+0.00");
5423 5412
             SERIAL_EOL();
5424 5413
           }
@@ -8021,7 +8010,7 @@ inline void gcode_M121() { endstops.enable_globally(false); }
8021 8010
     );
8022 8011
   }
8023 8012
 
8024
-#endif // BLINKM || RGB_LED
8013
+#endif // HAS_COLOR_LEDS
8025 8014
 
8026 8015
 /**
8027 8016
  * M200: Set filament diameter and set E axis units to cubic units
@@ -10634,7 +10623,7 @@ void process_next_command() {
10634 10623
           gcode_M150();
10635 10624
           break;
10636 10625
 
10637
-      #endif // BLINKM
10626
+      #endif // HAS_COLOR_LEDS
10638 10627
 
10639 10628
       #if ENABLED(MIXING_EXTRUDER)
10640 10629
         case 163: // M163: Set a component weight for mixing extruder

+ 2
- 6
Marlin/SanityCheck.h View File

@@ -1027,17 +1027,13 @@ static_assert(1 >= 0
1027 1027
     #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
1028 1028
   #elif ENABLED(RGBW_LED)
1029 1029
     #error "Please enable only one of RGB_LED and RGBW_LED."
1030
-  #elif ENABLED(BLINKM)
1031
-    #error "RGB_LED and BLINKM are currently incompatible (both use M150)."
1032 1030
   #endif
1033 1031
 #elif ENABLED(RGBW_LED)
1034 1032
   #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W))
1035 1033
     #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN."
1036
-  #elif ENABLED(BLINKM)
1037
-    #error "RGBW_LED and BLINKM are currently incompatible (both use M150)."
1038 1034
   #endif
1039
-#elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS)
1040
-  #error "PRINTER_EVENT_LEDS requires BLINKM, RGB_LED, or RGBW_LED."
1035
+#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632)
1036
+  #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, or RGBW_LED."
1041 1037
 #endif
1042 1038
 
1043 1039
 /**

+ 4
- 1
Marlin/example_configurations/CL-260/Configuration.h View File

@@ -1482,6 +1482,9 @@
1482 1482
 //define BlinkM/CyzRgb Support
1483 1483
 //#define BLINKM
1484 1484
 
1485
+//define PCA9632 PWM LED driver Support
1486
+//#define PCA9632
1487
+
1485 1488
 /**
1486 1489
  * RGB LED / LED Strip Control
1487 1490
  *
@@ -1519,7 +1522,7 @@
1519 1522
  *  - Change to green once print has finished
1520 1523
  *  - Turn off after the print has finished and the user has pushed a button
1521 1524
  */
1522
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1525
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1523 1526
   #define PRINTER_EVENT_LEDS
1524 1527
 #endif
1525 1528
 

+ 4
- 1
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -1479,6 +1479,9 @@
1479 1479
 //define BlinkM/CyzRgb Support
1480 1480
 //#define BLINKM
1481 1481
 
1482
+//define PCA9632 PWM LED driver Support
1483
+//#define PCA9632
1484
+
1482 1485
 /**
1483 1486
  * RGB LED / LED Strip Control
1484 1487
  *
@@ -1516,7 +1519,7 @@
1516 1519
  *  - Change to green once print has finished
1517 1520
  *  - Turn off after the print has finished and the user has pushed a button
1518 1521
  */
1519
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1522
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1520 1523
   #define PRINTER_EVENT_LEDS
1521 1524
 #endif
1522 1525
 

+ 4
- 1
Marlin/example_configurations/Felix/Configuration.h View File

@@ -1463,6 +1463,9 @@
1463 1463
 //define BlinkM/CyzRgb Support
1464 1464
 //#define BLINKM
1465 1465
 
1466
+//define PCA9632 PWM LED driver Support
1467
+//#define PCA9632
1468
+
1466 1469
 /**
1467 1470
  * RGB LED / LED Strip Control
1468 1471
  *
@@ -1500,7 +1503,7 @@
1500 1503
  *  - Change to green once print has finished
1501 1504
  *  - Turn off after the print has finished and the user has pushed a button
1502 1505
  */
1503
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1506
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1504 1507
   #define PRINTER_EVENT_LEDS
1505 1508
 #endif
1506 1509
 

+ 4
- 1
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -1463,6 +1463,9 @@
1463 1463
 //define BlinkM/CyzRgb Support
1464 1464
 //#define BLINKM
1465 1465
 
1466
+//define PCA9632 PWM LED driver Support
1467
+//#define PCA9632
1468
+
1466 1469
 /**
1467 1470
  * RGB LED / LED Strip Control
1468 1471
  *
@@ -1500,7 +1503,7 @@
1500 1503
  *  - Change to green once print has finished
1501 1504
  *  - Turn off after the print has finished and the user has pushed a button
1502 1505
  */
1503
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1506
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1504 1507
   #define PRINTER_EVENT_LEDS
1505 1508
 #endif
1506 1509
 

+ 4
- 1
Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h View File

@@ -1485,6 +1485,9 @@
1485 1485
 //define BlinkM/CyzRgb Support
1486 1486
 //#define BLINKM
1487 1487
 
1488
+//define PCA9632 PWM LED driver Support
1489
+//#define PCA9632
1490
+
1488 1491
 /**
1489 1492
  * RGB LED / LED Strip Control
1490 1493
  *
@@ -1522,7 +1525,7 @@
1522 1525
  *  - Change to green once print has finished
1523 1526
  *  - Turn off after the print has finished and the user has pushed a button
1524 1527
  */
1525
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1528
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1526 1529
   #define PRINTER_EVENT_LEDS
1527 1530
 #endif
1528 1531
 

+ 4
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -1471,6 +1471,9 @@
1471 1471
 //define BlinkM/CyzRgb Support
1472 1472
 //#define BLINKM
1473 1473
 
1474
+//define PCA9632 PWM LED driver Support
1475
+//#define PCA9632
1476
+
1474 1477
 /**
1475 1478
  * RGB LED / LED Strip Control
1476 1479
  *
@@ -1508,7 +1511,7 @@
1508 1511
  *  - Change to green once print has finished
1509 1512
  *  - Turn off after the print has finished and the user has pushed a button
1510 1513
  */
1511
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1514
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1512 1515
   #define PRINTER_EVENT_LEDS
1513 1516
 #endif
1514 1517
 

+ 4
- 1
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -1474,6 +1474,9 @@
1474 1474
 //define BlinkM/CyzRgb Support
1475 1475
 //#define BLINKM
1476 1476
 
1477
+//define PCA9632 PWM LED driver Support
1478
+//#define PCA9632
1479
+
1477 1480
 /**
1478 1481
  * RGB LED / LED Strip Control
1479 1482
  *
@@ -1511,7 +1514,7 @@
1511 1514
  *  - Change to green once print has finished
1512 1515
  *  - Turn off after the print has finished and the user has pushed a button
1513 1516
  */
1514
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1517
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1515 1518
   #define PRINTER_EVENT_LEDS
1516 1519
 #endif
1517 1520
 

+ 4
- 1
Marlin/example_configurations/K8200/Configuration.h View File

@@ -1515,6 +1515,9 @@
1515 1515
 //define BlinkM/CyzRgb Support
1516 1516
 //#define BLINKM
1517 1517
 
1518
+//define PCA9632 PWM LED driver Support
1519
+//#define PCA9632
1520
+
1518 1521
 /**
1519 1522
  * RGB LED / LED Strip Control
1520 1523
  *
@@ -1552,7 +1555,7 @@
1552 1555
  *  - Change to green once print has finished
1553 1556
  *  - Turn off after the print has finished and the user has pushed a button
1554 1557
  */
1555
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1558
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1556 1559
   #define PRINTER_EVENT_LEDS
1557 1560
 #endif
1558 1561
 

+ 4
- 1
Marlin/example_configurations/K8400/Configuration.h View File

@@ -1481,6 +1481,9 @@
1481 1481
 //define BlinkM/CyzRgb Support
1482 1482
 //#define BLINKM
1483 1483
 
1484
+//define PCA9632 PWM LED driver Support
1485
+//#define PCA9632
1486
+
1484 1487
 /**
1485 1488
  * RGB LED / LED Strip Control
1486 1489
  *
@@ -1518,7 +1521,7 @@
1518 1521
  *  - Change to green once print has finished
1519 1522
  *  - Turn off after the print has finished and the user has pushed a button
1520 1523
  */
1521
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1524
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1522 1525
   #define PRINTER_EVENT_LEDS
1523 1526
 #endif
1524 1527
 

+ 4
- 1
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

@@ -1481,6 +1481,9 @@
1481 1481
 //define BlinkM/CyzRgb Support
1482 1482
 //#define BLINKM
1483 1483
 
1484
+//define PCA9632 PWM LED driver Support
1485
+//#define PCA9632
1486
+
1484 1487
 /**
1485 1488
  * RGB LED / LED Strip Control
1486 1489
  *
@@ -1518,7 +1521,7 @@
1518 1521
  *  - Change to green once print has finished
1519 1522
  *  - Turn off after the print has finished and the user has pushed a button
1520 1523
  */
1521
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1524
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1522 1525
   #define PRINTER_EVENT_LEDS
1523 1526
 #endif
1524 1527
 

+ 4
- 1
Marlin/example_configurations/M150/Configuration.h View File

@@ -1508,6 +1508,9 @@
1508 1508
 //define BlinkM/CyzRgb Support
1509 1509
 //#define BLINKM
1510 1510
 
1511
+//define PCA9632 PWM LED driver Support
1512
+//#define PCA9632
1513
+
1511 1514
 /**
1512 1515
  * RGB LED / LED Strip Control
1513 1516
  *
@@ -1545,7 +1548,7 @@
1545 1548
  *  - Change to green once print has finished
1546 1549
  *  - Turn off after the print has finished and the user has pushed a button
1547 1550
  */
1548
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1551
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1549 1552
   #define PRINTER_EVENT_LEDS
1550 1553
 #endif
1551 1554
 

+ 4
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -1481,6 +1481,9 @@
1481 1481
 //define BlinkM/CyzRgb Support
1482 1482
 //#define BLINKM
1483 1483
 
1484
+//define PCA9632 PWM LED driver Support
1485
+//#define PCA9632
1486
+
1484 1487
 /**
1485 1488
  * RGB LED / LED Strip Control
1486 1489
  *
@@ -1518,7 +1521,7 @@
1518 1521
  *  - Change to green once print has finished
1519 1522
  *  - Turn off after the print has finished and the user has pushed a button
1520 1523
  */
1521
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1524
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1522 1525
   #define PRINTER_EVENT_LEDS
1523 1526
 #endif
1524 1527
 

+ 4
- 1
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -1481,6 +1481,9 @@
1481 1481
 //define BlinkM/CyzRgb Support
1482 1482
 //#define BLINKM
1483 1483
 
1484
+//define PCA9632 PWM LED driver Support
1485
+//#define PCA9632
1486
+
1484 1487
 /**
1485 1488
  * RGB LED / LED Strip Control
1486 1489
  *
@@ -1518,7 +1521,7 @@
1518 1521
  *  - Change to green once print has finished
1519 1522
  *  - Turn off after the print has finished and the user has pushed a button
1520 1523
  */
1521
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1524
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1522 1525
   #define PRINTER_EVENT_LEDS
1523 1526
 #endif
1524 1527
 

+ 4
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -1496,6 +1496,9 @@
1496 1496
 //define BlinkM/CyzRgb Support
1497 1497
 //#define BLINKM
1498 1498
 
1499
+//define PCA9632 PWM LED driver Support
1500
+//#define PCA9632
1501
+
1499 1502
 /**
1500 1503
  * RGB LED / LED Strip Control
1501 1504
  *
@@ -1533,7 +1536,7 @@
1533 1536
  *  - Change to green once print has finished
1534 1537
  *  - Turn off after the print has finished and the user has pushed a button
1535 1538
  */
1536
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1539
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1537 1540
   #define PRINTER_EVENT_LEDS
1538 1541
 #endif
1539 1542
 

+ 4
- 1
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -1500,6 +1500,9 @@
1500 1500
 //define BlinkM/CyzRgb Support
1501 1501
 //#define BLINKM
1502 1502
 
1503
+//define PCA9632 PWM LED driver Support
1504
+//#define PCA9632
1505
+
1503 1506
 /**
1504 1507
  * RGB LED / LED Strip Control
1505 1508
  *
@@ -1537,7 +1540,7 @@
1537 1540
  *  - Change to green once print has finished
1538 1541
  *  - Turn off after the print has finished and the user has pushed a button
1539 1542
  */
1540
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1543
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1541 1544
   #define PRINTER_EVENT_LEDS
1542 1545
 #endif
1543 1546
 

+ 4
- 1
Marlin/example_configurations/TinyBoy2/Configuration.h View File

@@ -1537,6 +1537,9 @@
1537 1537
 //define BlinkM/CyzRgb Support
1538 1538
 //#define BLINKM
1539 1539
 
1540
+//define PCA9632 PWM LED driver Support
1541
+//#define PCA9632
1542
+
1540 1543
 /**
1541 1544
  * RGB LED / LED Strip Control
1542 1545
  *
@@ -1574,7 +1577,7 @@
1574 1577
  *  - Change to green once print has finished
1575 1578
  *  - Turn off after the print has finished and the user has pushed a button
1576 1579
  */
1577
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1580
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1578 1581
   #define PRINTER_EVENT_LEDS
1579 1582
 #endif
1580 1583
 

+ 4
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -1471,6 +1471,9 @@
1471 1471
 //define BlinkM/CyzRgb Support
1472 1472
 //#define BLINKM
1473 1473
 
1474
+//define PCA9632 PWM LED driver Support
1475
+//#define PCA9632
1476
+
1474 1477
 /**
1475 1478
  * RGB LED / LED Strip Control
1476 1479
  *
@@ -1508,7 +1511,7 @@
1508 1511
  *  - Change to green once print has finished
1509 1512
  *  - Turn off after the print has finished and the user has pushed a button
1510 1513
  */
1511
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1514
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1512 1515
   #define PRINTER_EVENT_LEDS
1513 1516
 #endif
1514 1517
 

+ 4
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -1481,6 +1481,9 @@
1481 1481
 //define BlinkM/CyzRgb Support
1482 1482
 //#define BLINKM
1483 1483
 
1484
+//define PCA9632 PWM LED driver Support
1485
+//#define PCA9632
1486
+
1484 1487
 /**
1485 1488
  * RGB LED / LED Strip Control
1486 1489
  *
@@ -1518,7 +1521,7 @@
1518 1521
  *  - Change to green once print has finished
1519 1522
  *  - Turn off after the print has finished and the user has pushed a button
1520 1523
  */
1521
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1524
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1522 1525
   #define PRINTER_EVENT_LEDS
1523 1526
 #endif
1524 1527
 

+ 4
- 1
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h View File

@@ -1602,6 +1602,9 @@
1602 1602
 //define BlinkM/CyzRgb Support
1603 1603
 //#define BLINKM
1604 1604
 
1605
+//define PCA9632 PWM LED driver Support
1606
+//#define PCA9632
1607
+
1605 1608
 /**
1606 1609
  * RGB LED / LED Strip Control
1607 1610
  *
@@ -1639,7 +1642,7 @@
1639 1642
  *  - Change to green once print has finished
1640 1643
  *  - Turn off after the print has finished and the user has pushed a button
1641 1644
  */
1642
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1645
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1643 1646
   #define PRINTER_EVENT_LEDS
1644 1647
 #endif
1645 1648
 

+ 4
- 1
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h View File

@@ -1603,6 +1603,9 @@
1603 1603
 //define BlinkM/CyzRgb Support
1604 1604
 //#define BLINKM
1605 1605
 
1606
+//define PCA9632 PWM LED driver Support
1607
+//#define PCA9632
1608
+
1606 1609
 /**
1607 1610
  * RGB LED / LED Strip Control
1608 1611
  *
@@ -1640,7 +1643,7 @@
1640 1643
  *  - Change to green once print has finished
1641 1644
  *  - Turn off after the print has finished and the user has pushed a button
1642 1645
  */
1643
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1646
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1644 1647
   #define PRINTER_EVENT_LEDS
1645 1648
 #endif
1646 1649
 

+ 4
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -1592,6 +1592,9 @@
1592 1592
 //define BlinkM/CyzRgb Support
1593 1593
 //#define BLINKM
1594 1594
 
1595
+//define PCA9632 PWM LED driver Support
1596
+//#define PCA9632
1597
+
1595 1598
 /**
1596 1599
  * RGB LED / LED Strip Control
1597 1600
  *
@@ -1629,7 +1632,7 @@
1629 1632
  *  - Change to green once print has finished
1630 1633
  *  - Turn off after the print has finished and the user has pushed a button
1631 1634
  */
1632
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1635
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1633 1636
   #define PRINTER_EVENT_LEDS
1634 1637
 #endif
1635 1638
 

+ 4
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -1595,6 +1595,9 @@
1595 1595
 //define BlinkM/CyzRgb Support
1596 1596
 //#define BLINKM
1597 1597
 
1598
+//define PCA9632 PWM LED driver Support
1599
+//#define PCA9632
1600
+
1598 1601
 /**
1599 1602
  * RGB LED / LED Strip Control
1600 1603
  *
@@ -1632,7 +1635,7 @@
1632 1635
  *  - Change to green once print has finished
1633 1636
  *  - Turn off after the print has finished and the user has pushed a button
1634 1637
  */
1635
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1638
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1636 1639
   #define PRINTER_EVENT_LEDS
1637 1640
 #endif
1638 1641
 

+ 4
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -1600,6 +1600,9 @@
1600 1600
 //define BlinkM/CyzRgb Support
1601 1601
 //#define BLINKM
1602 1602
 
1603
+//define PCA9632 PWM LED driver Support
1604
+//#define PCA9632
1605
+
1603 1606
 /**
1604 1607
  * RGB LED / LED Strip Control
1605 1608
  *
@@ -1637,7 +1640,7 @@
1637 1640
  *  - Change to green once print has finished
1638 1641
  *  - Turn off after the print has finished and the user has pushed a button
1639 1642
  */
1640
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1643
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1641 1644
   #define PRINTER_EVENT_LEDS
1642 1645
 #endif
1643 1646
 

+ 4
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -1658,6 +1658,9 @@
1658 1658
 //define BlinkM/CyzRgb Support
1659 1659
 //#define BLINKM
1660 1660
 
1661
+//define PCA9632 PWM LED driver Support
1662
+//#define PCA9632
1663
+
1661 1664
 /**
1662 1665
  * RGB LED / LED Strip Control
1663 1666
  *
@@ -1695,7 +1698,7 @@
1695 1698
  *  - Change to green once print has finished
1696 1699
  *  - Turn off after the print has finished and the user has pushed a button
1697 1700
  */
1698
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1701
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1699 1702
   #define PRINTER_EVENT_LEDS
1700 1703
 #endif
1701 1704
 

+ 4
- 1
Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h View File

@@ -1497,6 +1497,9 @@
1497 1497
 //define BlinkM/CyzRgb Support
1498 1498
 //#define BLINKM
1499 1499
 
1500
+//define PCA9632 PWM LED driver Support
1501
+//#define PCA9632
1502
+
1500 1503
 /**
1501 1504
  * RGB LED / LED Strip Control
1502 1505
  *
@@ -1534,7 +1537,7 @@
1534 1537
  *  - Change to green once print has finished
1535 1538
  *  - Turn off after the print has finished and the user has pushed a button
1536 1539
  */
1537
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1540
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1538 1541
   #define PRINTER_EVENT_LEDS
1539 1542
 #endif
1540 1543
 

+ 4
- 1
Marlin/example_configurations/makibox/Configuration.h View File

@@ -1484,6 +1484,9 @@
1484 1484
 //define BlinkM/CyzRgb Support
1485 1485
 //#define BLINKM
1486 1486
 
1487
+//define PCA9632 PWM LED driver Support
1488
+//#define PCA9632
1489
+
1487 1490
 /**
1488 1491
  * RGB LED / LED Strip Control
1489 1492
  *
@@ -1521,7 +1524,7 @@
1521 1524
  *  - Change to green once print has finished
1522 1525
  *  - Turn off after the print has finished and the user has pushed a button
1523 1526
  */
1524
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1527
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1525 1528
   #define PRINTER_EVENT_LEDS
1526 1529
 #endif
1527 1530
 

+ 4
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -1476,6 +1476,9 @@
1476 1476
 //define BlinkM/CyzRgb Support
1477 1477
 //#define BLINKM
1478 1478
 
1479
+//define PCA9632 PWM LED driver Support
1480
+//#define PCA9632
1481
+
1479 1482
 /**
1480 1483
  * RGB LED / LED Strip Control
1481 1484
  *
@@ -1513,7 +1516,7 @@
1513 1516
  *  - Change to green once print has finished
1514 1517
  *  - Turn off after the print has finished and the user has pushed a button
1515 1518
  */
1516
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1519
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1517 1520
   #define PRINTER_EVENT_LEDS
1518 1521
 #endif
1519 1522
 

+ 4
- 1
Marlin/example_configurations/wt150/Configuration.h View File

@@ -1486,6 +1486,9 @@
1486 1486
 //define BlinkM/CyzRgb Support
1487 1487
 //#define BLINKM
1488 1488
 
1489
+//define PCA9632 PWM LED driver Support
1490
+//#define PCA9632
1491
+
1489 1492
 // Support for an RGB LED using 3 separate pins with optional PWM
1490 1493
 //#define RGB_LED
1491 1494
 //#define RGBW_LED
@@ -1507,7 +1510,7 @@
1507 1510
  *  - Change to green once print has finished
1508 1511
  *  - Turn off after the print has finished and the user has pushed a button
1509 1512
  */
1510
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1513
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1511 1514
   #define PRINTER_EVENT_LEDS
1512 1515
 #endif
1513 1516
 

+ 115
- 0
Marlin/pca9632.cpp View File

@@ -0,0 +1,115 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/*
24
+ * Driver for the Philips PCA9632 LED driver.
25
+ * Written by Robert Mendon Feb 2017.
26
+ */
27
+
28
+#include "MarlinConfig.h"
29
+
30
+#if ENABLED(PCA9632)
31
+
32
+#include "pca9632.h"
33
+
34
+#define PCA9632_MODE1_VALUE   0b00000001 //(ALLCALL)
35
+#define PCA9632_MODE2_VALUE   0b00010101 //(DIMMING, INVERT, CHANGE ON STOP,TOTEM)
36
+#define PCA9632_LEDOUT_VALUE  0b00101010
37
+
38
+
39
+/* Register addresses */
40
+#define PCA9632_MODE1       0x00
41
+#define PCA9632_MODE2       0x01
42
+#define PCA9632_PWM0        0x02
43
+#define PCA9632_PWM1        0x03
44
+#define PCA9632_PWM2        0x04
45
+#define PCA9632_PWM3        0x05
46
+#define PCA9632_GRPPWM      0x06
47
+#define PCA9632_GRPFREQ     0x07
48
+#define PCA9632_LEDOUT      0X08
49
+#define PCA9632_SUBADR1     0x09
50
+#define PCA9632_SUBADR2     0x0A
51
+#define PCA9632_SUBADR3     0x0B
52
+#define PCA9632_ALLCALLADDR 0x0C
53
+
54
+#define PCA9632_NO_AUTOINC  0x00
55
+#define PCA9632_AUTO_ALL    0x80
56
+#define PCA9632_AUTO_IND    0xA0
57
+#define PCA9632_AUTOGLO     0xC0
58
+#define PCA9632_AUTOGI      0xE0
59
+
60
+// Red   LED0
61
+// Green LED1
62
+// Blue  LED2
63
+#define PCA9632_RED     0x00
64
+#define PCA9632_GRN     0x02
65
+#define PCA9632_BLU     0x04
66
+
67
+#define LED_OFF   0x00
68
+#define LED_ON    0x01
69
+#define LED_PWM   0x02
70
+
71
+#define PCA9632_ADDRESS 0b01100000
72
+
73
+byte PCA_init = 0;
74
+
75
+static void PCA9632_WriteRegister(const byte addr, const byte regadd, const byte value) {
76
+  Wire.beginTransmission(addr);
77
+  Wire.write(regadd);
78
+  Wire.write(value);
79
+  Wire.endTransmission();
80
+}
81
+
82
+static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const byte value1, const byte value2, const byte value3) {
83
+  Wire.beginTransmission(addr);
84
+  Wire.write(PCA9632_AUTO_IND | regadd);
85
+  Wire.write(value1);
86
+  Wire.write(value2);
87
+  Wire.write(value3);
88
+  Wire.endTransmission();
89
+}
90
+
91
+static byte PCA9632_ReadRegister(const byte addr, const byte regadd) {
92
+  Wire.beginTransmission(addr);
93
+  Wire.write(regadd);
94
+  const byte value = Wire.read();
95
+  Wire.endTransmission();
96
+  return value;
97
+}
98
+
99
+void PCA9632_SetColor(const byte r, const byte g, const byte b) {
100
+  if (!PCA_init) {
101
+    PCA_init = 1;
102
+    Wire.begin();
103
+    PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE1, PCA9632_MODE1_VALUE);
104
+    PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE2, PCA9632_MODE2_VALUE);
105
+  }
106
+
107
+  const byte LEDOUT = (r ? LED_PWM << PCA9632_RED : 0)
108
+                    | (g ? LED_PWM << PCA9632_GRN : 0)
109
+                    | (b ? LED_PWM << PCA9632_BLU : 0);
110
+
111
+  PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, r, g, b);
112
+  PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT);
113
+}
114
+
115
+#endif // PCA9632

+ 36
- 0
Marlin/pca9632.h View File

@@ -0,0 +1,36 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/*
24
+ * Driver for the Philips PCA9632 LED driver.
25
+ * Written by Robert Mendon Feb 2017.
26
+ */
27
+
28
+#ifndef __PCA9632_H__
29
+#define __PCA9632_H__
30
+
31
+#include "Arduino.h"
32
+#include "Wire.h"
33
+
34
+void PCA9632_SetColor(const byte r, const byte g, const byte  b);
35
+
36
+#endif // __PCA9632_H__

+ 2
- 2
Marlin/ultralcd_impl_HD44780.h View File

@@ -341,13 +341,13 @@ static void lcd_set_custom_characters(
341 341
         }
342 342
         else { // Custom characters for submenus
343 343
           createChar_P(LCD_UPLEVEL_CHAR, uplevel);
344
-          createChar_P(LCD_REFRESH_CHAR, refresh);
344
+          createChar_P(LCD_STR_REFRESH[0], refresh);
345 345
           createChar_P(LCD_STR_FOLDER[0], folder);
346 346
         }
347 347
       }
348 348
     #else
349 349
       createChar_P(LCD_UPLEVEL_CHAR, uplevel);
350
-      createChar_P(LCD_REFRESH_CHAR, refresh);
350
+      createChar_P(LCD_STR_REFRESH[0], refresh);
351 351
       createChar_P(LCD_STR_FOLDER[0], folder);
352 352
     #endif
353 353
 

Loading…
Cancel
Save