|
@@ -142,520 +142,419 @@ void GcodeSuite::process_parsed_command() {
|
142
|
142
|
switch (parser.command_letter) {
|
143
|
143
|
case 'G': switch (parser.codenum) {
|
144
|
144
|
|
145
|
|
- // G0, G1
|
146
|
|
- case 0:
|
147
|
|
- case 1:
|
148
|
|
- #if IS_SCARA
|
149
|
|
- G0_G1(parser.codenum == 0);
|
150
|
|
- #else
|
151
|
|
- G0_G1();
|
152
|
|
- #endif
|
153
|
|
- break;
|
|
145
|
+ case 0: case 1: G0_G1( // G0: Fast Move, G1: Linear Move
|
|
146
|
+ #if IS_SCARA
|
|
147
|
+ parser.codenum == 0
|
|
148
|
+ #endif
|
|
149
|
+ );
|
|
150
|
+ break;
|
154
|
151
|
|
155
|
|
- // G2, G3
|
156
|
152
|
#if ENABLED(ARC_SUPPORT) && DISABLED(SCARA)
|
157
|
|
- case 2: // G2: CW ARC
|
158
|
|
- case 3: // G3: CCW ARC
|
159
|
|
- G2_G3(parser.codenum == 2);
|
160
|
|
- break;
|
|
153
|
+ case 2: case 3: G2_G3(parser.codenum == 2); break; // G2: CW ARC, G3: CCW ARC
|
161
|
154
|
#endif
|
162
|
155
|
|
163
|
|
- // G4 Dwell
|
164
|
|
- case 4:
|
165
|
|
- G4();
|
166
|
|
- break;
|
|
156
|
+ case 4: G4(); break; // G4: Dwell
|
167
|
157
|
|
168
|
158
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
169
|
|
- case 5: // G5: Cubic B_spline
|
170
|
|
- G5();
|
171
|
|
- break;
|
172
|
|
- #endif // BEZIER_CURVE_SUPPORT
|
|
159
|
+ case 5: G5(); break; // G5: Cubic B_spline
|
|
160
|
+ #endif
|
173
|
161
|
|
174
|
162
|
#if ENABLED(FWRETRACT)
|
175
|
|
- case 10: // G10: retract
|
176
|
|
- G10();
|
177
|
|
- break;
|
178
|
|
- case 11: // G11: retract_recover
|
179
|
|
- G11();
|
180
|
|
- break;
|
181
|
|
- #endif // FWRETRACT
|
|
163
|
+ case 10: G10(); break; // G10: Retract / Swap Retract
|
|
164
|
+ case 11: G11(); break; // G11: Recover / Swap Recover
|
|
165
|
+ #endif
|
182
|
166
|
|
183
|
167
|
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
184
|
|
- case 12:
|
185
|
|
- G12(); // G12: Nozzle Clean
|
186
|
|
- break;
|
187
|
|
- #endif // NOZZLE_CLEAN_FEATURE
|
|
168
|
+ case 12: G12(); break; // G12: Nozzle Clean
|
|
169
|
+ #endif
|
188
|
170
|
|
189
|
171
|
#if ENABLED(CNC_WORKSPACE_PLANES)
|
190
|
|
- case 17: // G17: Select Plane XY
|
191
|
|
- G17();
|
192
|
|
- break;
|
193
|
|
- case 18: // G18: Select Plane ZX
|
194
|
|
- G18();
|
195
|
|
- break;
|
196
|
|
- case 19: // G19: Select Plane YZ
|
197
|
|
- G19();
|
198
|
|
- break;
|
199
|
|
- #endif // CNC_WORKSPACE_PLANES
|
|
172
|
+ case 17: G17(); break; // G17: Select Plane XY
|
|
173
|
+ case 18: G18(); break; // G18: Select Plane ZX
|
|
174
|
+ case 19: G19(); break; // G19: Select Plane YZ
|
|
175
|
+ #endif
|
200
|
176
|
|
201
|
177
|
#if ENABLED(INCH_MODE_SUPPORT)
|
202
|
|
- case 20: // G20: Inch Mode
|
203
|
|
- G20();
|
204
|
|
- break;
|
205
|
|
-
|
206
|
|
- case 21: // G21: MM Mode
|
207
|
|
- G21();
|
208
|
|
- break;
|
209
|
|
- #endif // INCH_MODE_SUPPORT
|
|
178
|
+ case 20: G20(); break; // G20: Inch Mode
|
|
179
|
+ case 21: G21(); break; // G21: MM Mode
|
|
180
|
+ #endif
|
210
|
181
|
|
211
|
182
|
#if ENABLED(G26_MESH_VALIDATION)
|
212
|
|
- case 26: // G26: Mesh Validation Pattern generation
|
213
|
|
- G26();
|
214
|
|
- break;
|
215
|
|
- #endif // AUTO_BED_LEVELING_UBL
|
|
183
|
+ case 26: G26(); break; // G26: Mesh Validation Pattern generation
|
|
184
|
+ #endif
|
216
|
185
|
|
217
|
186
|
#if ENABLED(NOZZLE_PARK_FEATURE)
|
218
|
|
- case 27: // G27: Nozzle Park
|
219
|
|
- G27();
|
220
|
|
- break;
|
221
|
|
- #endif // NOZZLE_PARK_FEATURE
|
|
187
|
+ case 27: G27(); break; // G27: Nozzle Park
|
|
188
|
+ #endif
|
222
|
189
|
|
223
|
|
- case 28: // G28: Home all axes, one at a time
|
224
|
|
- G28(false);
|
225
|
|
- break;
|
|
190
|
+ case 28: G28(false); break; // G28: Home all axes, one at a time
|
226
|
191
|
|
227
|
192
|
#if HAS_LEVELING
|
228
|
|
- case 29: // G29 Detailed Z probe, probes the bed at 3 or more points,
|
229
|
|
- // or provides access to the UBL System if enabled.
|
230
|
|
- G29();
|
231
|
|
- break;
|
232
|
|
- #endif // HAS_LEVELING
|
|
193
|
+ case 29: G29(); break; // G29: Bed leveling calibration
|
|
194
|
+ #endif
|
233
|
195
|
|
234
|
196
|
#if HAS_BED_PROBE
|
235
|
|
-
|
236
|
|
- case 30: // G30 Single Z probe
|
237
|
|
- G30();
|
238
|
|
- break;
|
239
|
|
-
|
|
197
|
+ case 30: G30(); break; // G30: Single Z probe
|
240
|
198
|
#if ENABLED(Z_PROBE_SLED)
|
241
|
|
-
|
242
|
|
- case 31: // G31: dock the sled
|
243
|
|
- G31();
|
244
|
|
- break;
|
245
|
|
-
|
246
|
|
- case 32: // G32: undock the sled
|
247
|
|
- G32();
|
248
|
|
- break;
|
249
|
|
-
|
250
|
|
- #endif // Z_PROBE_SLED
|
251
|
|
-
|
252
|
|
- #endif // HAS_BED_PROBE
|
|
199
|
+ case 31: G31(); break; // G31: dock the sled
|
|
200
|
+ case 32: G32(); break; // G32: undock the sled
|
|
201
|
+ #endif
|
|
202
|
+ #endif
|
253
|
203
|
|
254
|
204
|
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
255
|
|
- case 33: // G33: Delta Auto-Calibration
|
256
|
|
- G33();
|
257
|
|
- break;
|
258
|
|
- #endif // DELTA_AUTO_CALIBRATION
|
|
205
|
+ case 33: G33(); break; // G33: Delta Auto-Calibration
|
|
206
|
+ #endif
|
259
|
207
|
|
260
|
208
|
#if ENABLED(G38_PROBE_TARGET)
|
261
|
|
- case 38: // G38.2 & G38.3
|
|
209
|
+ case 38: // G38.2 & G38.3
|
262
|
210
|
if (parser.subcode == 2 || parser.subcode == 3)
|
263
|
211
|
G38(parser.subcode == 2);
|
264
|
212
|
break;
|
265
|
213
|
#endif
|
266
|
214
|
|
267
|
|
- case 90: // G90
|
268
|
|
- relative_mode = false;
|
269
|
|
- break;
|
270
|
|
- case 91: // G91
|
271
|
|
- relative_mode = true;
|
272
|
|
- break;
|
|
215
|
+ case 90: relative_mode = false; break; // G90: Relative Mode
|
|
216
|
+ case 91: relative_mode = true; break; // G91: Absolute Mode
|
273
|
217
|
|
274
|
|
- case 92: // G92 - Set current axis position(s)
|
275
|
|
- G92();
|
276
|
|
- break;
|
|
218
|
+ case 92: G92(); break; // G92: Set current axis position(s)
|
277
|
219
|
|
278
|
220
|
#if HAS_MESH
|
279
|
|
- case 42: G42(); break; // G42: Coordinated move to a mesh point
|
|
221
|
+ case 42: G42(); break; // G42: Coordinated move to a mesh point
|
280
|
222
|
#endif
|
281
|
223
|
|
282
|
224
|
#if ENABLED(DEBUG_GCODE_PARSER)
|
283
|
|
- case 800:
|
284
|
|
- parser.debug(); // GCode Parser Test for G
|
285
|
|
- break;
|
|
225
|
+ case 800: parser.debug(); break; // G800: GCode Parser Test for G
|
286
|
226
|
#endif
|
287
|
227
|
}
|
288
|
228
|
break;
|
289
|
229
|
|
290
|
230
|
case 'M': switch (parser.codenum) {
|
291
|
231
|
#if HAS_RESUME_CONTINUE
|
292
|
|
- case 0: // M0: Unconditional stop - Wait for user button press on LCD
|
293
|
|
- case 1: // M1: Conditional stop - Wait for user button press on LCD
|
294
|
|
- M0_M1();
|
295
|
|
- break;
|
296
|
|
- #endif // ULTIPANEL
|
|
232
|
+ case 0: // M0: Unconditional stop - Wait for user button press on LCD
|
|
233
|
+ case 1: M0_M1(); break; // M1: Conditional stop - Wait for user button press on LCD
|
|
234
|
+ #endif
|
297
|
235
|
|
298
|
236
|
#if ENABLED(SPINDLE_LASER_ENABLE)
|
299
|
|
- // These synchronize with movement commands...
|
300
|
|
- case 3: M3_M4(true ); break; // M3: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CW
|
301
|
|
- case 4: M3_M4(false); break; // M4: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CCW
|
302
|
|
- case 5: M5(); break; // M5 - turn spindle/laser off
|
|
237
|
+ case 3: M3_M4(true ); break; // M3: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CW
|
|
238
|
+ case 4: M3_M4(false); break; // M4: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CCW
|
|
239
|
+ case 5: M5(); break; // M5 - turn spindle/laser off
|
303
|
240
|
#endif
|
304
|
241
|
|
305
|
|
- case 17: // M17: Enable all stepper motors
|
306
|
|
- M17();
|
307
|
|
- break;
|
|
242
|
+ case 17: M17(); break; // M17: Enable all stepper motors
|
308
|
243
|
|
309
|
244
|
#if ENABLED(SDSUPPORT)
|
310
|
|
- case 20: M20(); break; // M20: list SD card
|
311
|
|
- case 21: M21(); break; // M21: init SD card
|
312
|
|
- case 22: M22(); break; // M22: release SD card
|
313
|
|
- case 23: M23(); break; // M23: Select file
|
314
|
|
- case 24: M24(); break; // M24: Start SD print
|
315
|
|
- case 25: M25(); break; // M25: Pause SD print
|
316
|
|
- case 26: M26(); break; // M26: Set SD index
|
317
|
|
- case 27: M27(); break; // M27: Get SD status
|
318
|
|
- case 28: M28(); break; // M28: Start SD write
|
319
|
|
- case 29: M29(); break; // M29: Stop SD write
|
320
|
|
- case 30: M30(); break; // M30 <filename> Delete File
|
321
|
|
- case 32: M32(); break; // M32: Select file and start SD print
|
|
245
|
+ case 20: M20(); break; // M20: list SD card
|
|
246
|
+ case 21: M21(); break; // M21: init SD card
|
|
247
|
+ case 22: M22(); break; // M22: release SD card
|
|
248
|
+ case 23: M23(); break; // M23: Select file
|
|
249
|
+ case 24: M24(); break; // M24: Start SD print
|
|
250
|
+ case 25: M25(); break; // M25: Pause SD print
|
|
251
|
+ case 26: M26(); break; // M26: Set SD index
|
|
252
|
+ case 27: M27(); break; // M27: Get SD status
|
|
253
|
+ case 28: M28(); break; // M28: Start SD write
|
|
254
|
+ case 29: M29(); break; // M29: Stop SD write
|
|
255
|
+ case 30: M30(); break; // M30 <filename> Delete File
|
|
256
|
+ case 32: M32(); break; // M32: Select file and start SD print
|
322
|
257
|
|
323
|
258
|
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
|
324
|
|
- case 33: M33(); break; // M33: Get the long full path to a file or folder
|
|
259
|
+ case 33: M33(); break; // M33: Get the long full path to a file or folder
|
325
|
260
|
#endif
|
326
|
261
|
|
327
|
262
|
#if ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_GCODE)
|
328
|
|
- case 34: M34(); break; // M34: Set SD card sorting options
|
|
263
|
+ case 34: M34(); break; // M34: Set SD card sorting options
|
329
|
264
|
#endif
|
330
|
265
|
|
331
|
|
- case 928: M928(); break; // M928: Start SD write
|
|
266
|
+ case 928: M928(); break; // M928: Start SD write
|
332
|
267
|
#endif // SDSUPPORT
|
333
|
268
|
|
334
|
|
- case 31: M31(); break; // M31: Report time since the start of SD print or last M109
|
335
|
|
-
|
336
|
|
- case 42: M42(); break; // M42: Change pin state
|
|
269
|
+ case 31: M31(); break; // M31: Report time since the start of SD print or last M109
|
|
270
|
+ case 42: M42(); break; // M42: Change pin state
|
337
|
271
|
|
338
|
272
|
#if ENABLED(PINS_DEBUGGING)
|
339
|
|
- case 43: M43(); break; // M43: Read pin state
|
|
273
|
+ case 43: M43(); break; // M43: Read pin state
|
340
|
274
|
#endif
|
341
|
275
|
|
342
|
276
|
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
343
|
|
- case 48: M48(); break; // M48: Z probe repeatability test
|
|
277
|
+ case 48: M48(); break; // M48: Z probe repeatability test
|
344
|
278
|
#endif
|
345
|
279
|
|
346
|
280
|
#if ENABLED(G26_MESH_VALIDATION)
|
347
|
|
- case 49: M49(); break; // M49: Turn on or off G26 debug flag for verbose output
|
|
281
|
+ case 49: M49(); break; // M49: Turn on or off G26 debug flag for verbose output
|
348
|
282
|
#endif
|
349
|
283
|
|
350
|
284
|
#if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY)
|
351
|
|
- case 73: M73(); break; // M73: Set progress percentage (for display on LCD)
|
|
285
|
+ case 73: M73(); break; // M73: Set progress percentage (for display on LCD)
|
352
|
286
|
#endif
|
353
|
287
|
|
354
|
|
- case 75: M75(); break; // M75: Start print timer
|
355
|
|
- case 76: M76(); break; // M76: Pause print timer
|
356
|
|
- case 77: M77(); break; // M77: Stop print timer
|
|
288
|
+ case 75: M75(); break; // M75: Start print timer
|
|
289
|
+ case 76: M76(); break; // M76: Pause print timer
|
|
290
|
+ case 77: M77(); break; // M77: Stop print timer
|
357
|
291
|
|
358
|
292
|
#if ENABLED(PRINTCOUNTER)
|
359
|
|
- case 78: M78(); break; // M78: Show print statistics
|
|
293
|
+ case 78: M78(); break; // M78: Show print statistics
|
360
|
294
|
#endif
|
361
|
295
|
|
362
|
296
|
#if ENABLED(M100_FREE_MEMORY_WATCHER)
|
363
|
|
- case 100: M100(); break; // M100: Free Memory Report
|
|
297
|
+ case 100: M100(); break; // M100: Free Memory Report
|
364
|
298
|
#endif
|
365
|
299
|
|
366
|
|
- case 104: M104(); break; // M104: Set hot end temperature
|
367
|
|
- case 109: M109(); break; // M109: Wait for hotend temperature to reach target
|
368
|
|
-
|
369
|
|
- case 110: M110(); break; // M110: Set Current Line Number
|
370
|
|
-
|
371
|
|
- case 111: M111(); break; // M111: Set debug level
|
|
300
|
+ case 104: M104(); break; // M104: Set hot end temperature
|
|
301
|
+ case 109: M109(); break; // M109: Wait for hotend temperature to reach target
|
|
302
|
+ case 110: M110(); break; // M110: Set Current Line Number
|
|
303
|
+ case 111: M111(); break; // M111: Set debug level
|
372
|
304
|
|
373
|
305
|
#if DISABLED(EMERGENCY_PARSER)
|
374
|
|
- case 108: M108(); break; // M108: Cancel Waiting
|
375
|
|
- case 112: M112(); break; // M112: Emergency Stop
|
376
|
|
- case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
|
|
306
|
+ case 108: M108(); break; // M108: Cancel Waiting
|
|
307
|
+ case 112: M112(); break; // M112: Emergency Stop
|
|
308
|
+ case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
|
377
|
309
|
#endif
|
378
|
310
|
|
379
|
311
|
#if ENABLED(HOST_KEEPALIVE_FEATURE)
|
380
|
|
- case 113: M113(); break; // M113: Set Host Keepalive interval
|
|
312
|
+ case 113: M113(); break; // M113: Set Host Keepalive interval
|
381
|
313
|
#endif
|
382
|
314
|
|
383
|
315
|
#if HAS_HEATER_BED && HAS_TEMP_BED
|
384
|
|
- case 140: M140(); break; // M140: Set bed temperature
|
385
|
|
- case 190: M190(); break; // M190: Wait for bed temperature to reach target
|
|
316
|
+ case 140: M140(); break; // M140: Set bed temperature
|
|
317
|
+ case 190: M190(); break; // M190: Wait for bed temperature to reach target
|
386
|
318
|
#endif
|
387
|
319
|
|
388
|
|
- case 105: // M105: Report current temperature
|
389
|
|
- M105();
|
390
|
|
- KEEPALIVE_STATE(NOT_BUSY);
|
391
|
|
- return; // "ok" already printed
|
|
320
|
+ case 105: M105(); KEEPALIVE_STATE(NOT_BUSY); return; // M105: Report Temperatures (and say "ok")
|
392
|
321
|
|
393
|
322
|
#if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
|
394
|
|
- case 155: M155(); break; // M155: Set temperature auto-report interval
|
|
323
|
+ case 155: M155(); break; // M155: Set temperature auto-report interval
|
395
|
324
|
#endif
|
396
|
325
|
|
397
|
326
|
#if FAN_COUNT > 0
|
398
|
|
- case 106: M106(); break; // M106: Fan On
|
399
|
|
- case 107: M107(); break; // M107: Fan Off
|
|
327
|
+ case 106: M106(); break; // M106: Fan On
|
|
328
|
+ case 107: M107(); break; // M107: Fan Off
|
400
|
329
|
#endif
|
401
|
330
|
|
402
|
331
|
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
403
|
|
- case 125: M125(); break; // M125: Store current position and move to filament change position
|
|
332
|
+ case 125: M125(); break; // M125: Store current position and move to filament change position
|
404
|
333
|
#endif
|
405
|
334
|
|
406
|
335
|
#if ENABLED(BARICUDA)
|
407
|
336
|
// PWM for HEATER_1_PIN
|
408
|
337
|
#if HAS_HEATER_1
|
409
|
|
- case 126: M126(); break; // M126: valve open
|
410
|
|
- case 127: M127(); break; // M127: valve closed
|
|
338
|
+ case 126: M126(); break; // M126: valve open
|
|
339
|
+ case 127: M127(); break; // M127: valve closed
|
411
|
340
|
#endif
|
412
|
341
|
|
413
|
342
|
// PWM for HEATER_2_PIN
|
414
|
343
|
#if HAS_HEATER_2
|
415
|
|
- case 128: M128(); break; // M128: valve open
|
416
|
|
- case 129: M129(); break; // M129: valve closed
|
|
344
|
+ case 128: M128(); break; // M128: valve open
|
|
345
|
+ case 129: M129(); break; // M129: valve closed
|
417
|
346
|
#endif
|
418
|
347
|
#endif // BARICUDA
|
419
|
348
|
|
420
|
349
|
#if HAS_POWER_SWITCH
|
421
|
|
- case 80: M80(); break; // M80: Turn on Power Supply
|
422
|
|
- #endif
|
423
|
|
-
|
424
|
|
- case 81: M81(); break; // M81: Turn off Power, including Power Supply, if possible
|
425
|
|
-
|
426
|
|
- case 82: M82(); break; // M82: Set E axis normal mode (same as other axes)
|
427
|
|
- case 83: M83(); break; // M83: Set E axis relative mode
|
428
|
|
-
|
429
|
|
- case 18: // M18 => M84
|
430
|
|
- case 84: M18_M84(); break; // M84: Disable all steppers or set timeout
|
431
|
|
- case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout
|
432
|
|
-
|
433
|
|
- case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
|
434
|
|
-
|
435
|
|
- case 114: M114(); break; // M114: Report current position
|
436
|
|
-
|
437
|
|
- case 115: M115(); break; // M115: Report capabilities
|
438
|
|
-
|
439
|
|
- case 117: M117(); break; // M117: Set LCD message text, if possible
|
440
|
|
- case 118: M118(); break; // M118: Display a message in the host console
|
441
|
|
-
|
442
|
|
- case 119: M119(); break; // M119: Report endstop states
|
443
|
|
- case 120: M120(); break; // M120: Enable endstops
|
444
|
|
- case 121: M121(); break; // M121: Disable endstops
|
|
350
|
+ case 80: M80(); break; // M80: Turn on Power Supply
|
|
351
|
+ #endif
|
|
352
|
+ case 81: M81(); break; // M81: Turn off Power, including Power Supply, if possible
|
|
353
|
+
|
|
354
|
+ case 82: M82(); break; // M82: Set E axis normal mode (same as other axes)
|
|
355
|
+ case 83: M83(); break; // M83: Set E axis relative mode
|
|
356
|
+ case 18: case 84: M18_M84(); break; // M18/M84: Disable Steppers / Set Timeout
|
|
357
|
+ case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout
|
|
358
|
+ case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
|
|
359
|
+ case 114: M114(); break; // M114: Report current position
|
|
360
|
+ case 115: M115(); break; // M115: Report capabilities
|
|
361
|
+ case 117: M117(); break; // M117: Set LCD message text, if possible
|
|
362
|
+ case 118: M118(); break; // M118: Display a message in the host console
|
|
363
|
+ case 119: M119(); break; // M119: Report endstop states
|
|
364
|
+ case 120: M120(); break; // M120: Enable endstops
|
|
365
|
+ case 121: M121(); break; // M121: Disable endstops
|
445
|
366
|
|
446
|
367
|
#if ENABLED(ULTIPANEL)
|
447
|
|
- case 145: M145(); break; // M145: Set material heatup parameters
|
|
368
|
+ case 145: M145(); break; // M145: Set material heatup parameters
|
448
|
369
|
#endif
|
449
|
370
|
|
450
|
371
|
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
|
451
|
|
- case 149: M149(); break; // M149: Set temperature units
|
|
372
|
+ case 149: M149(); break; // M149: Set temperature units
|
452
|
373
|
#endif
|
453
|
374
|
|
454
|
375
|
#if HAS_COLOR_LEDS
|
455
|
|
- case 150: M150(); break; // M150: Set Status LED Color
|
|
376
|
+ case 150: M150(); break; // M150: Set Status LED Color
|
456
|
377
|
#endif
|
457
|
378
|
|
458
|
379
|
#if ENABLED(MIXING_EXTRUDER)
|
459
|
|
- case 163: M163(); break; // M163: Set a component weight for mixing extruder
|
|
380
|
+ case 163: M163(); break; // M163: Set a component weight for mixing extruder
|
460
|
381
|
#if MIXING_VIRTUAL_TOOLS > 1
|
461
|
|
- case 164: M164(); break; // M164: Save current mix as a virtual extruder
|
|
382
|
+ case 164: M164(); break; // M164: Save current mix as a virtual extruder
|
462
|
383
|
#endif
|
463
|
384
|
#if ENABLED(DIRECT_MIXING_IN_G1)
|
464
|
|
- case 165: M165(); break; // M165: Set multiple mix weights
|
|
385
|
+ case 165: M165(); break; // M165: Set multiple mix weights
|
465
|
386
|
#endif
|
466
|
387
|
#endif
|
467
|
388
|
|
468
|
389
|
#if DISABLED(NO_VOLUMETRICS)
|
469
|
|
- case 200: M200(); break; // M200: Set filament diameter, E to cubic units
|
|
390
|
+ case 200: M200(); break; // M200: Set filament diameter, E to cubic units
|
470
|
391
|
#endif
|
471
|
392
|
|
472
|
|
- case 201: M201(); break; // M201: Set max acceleration for print moves (units/s^2)
|
|
393
|
+ case 201: M201(); break; // M201: Set max acceleration for print moves (units/s^2)
|
473
|
394
|
|
474
|
395
|
#if 0
|
475
|
|
- case 202: M202(); break; // Not used for Sprinter/grbl gen6
|
|
396
|
+ case 202: M202(); break; // M202: Not used for Sprinter/grbl gen6
|
476
|
397
|
#endif
|
477
|
398
|
|
478
|
|
- case 203: M203(); break; // M203: Set max feedrate (units/sec)
|
479
|
|
- case 204: M204(); break; // M204: Set acceleration
|
480
|
|
- case 205: M205(); break; // M205: Set advanced settings
|
|
399
|
+ case 203: M203(); break; // M203: Set max feedrate (units/sec)
|
|
400
|
+ case 204: M204(); break; // M204: Set acceleration
|
|
401
|
+ case 205: M205(); break; // M205: Set advanced settings
|
481
|
402
|
|
482
|
403
|
#if HAS_M206_COMMAND
|
483
|
|
- case 206: M206(); break; // M206: Set home offsets
|
|
404
|
+ case 206: M206(); break; // M206: Set home offsets
|
484
|
405
|
#endif
|
485
|
406
|
|
486
|
407
|
#if ENABLED(DELTA)
|
487
|
|
- case 665: M665(); break; // M665: Set delta configurations
|
|
408
|
+ case 665: M665(); break; // M665: Set delta configurations
|
488
|
409
|
#endif
|
489
|
410
|
|
490
|
411
|
#if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
491
|
|
- case 666: M666(); break; // M666: Set delta or dual endstop adjustment
|
|
412
|
+ case 666: M666(); break; // M666: Set delta or dual endstop adjustment
|
492
|
413
|
#endif
|
493
|
414
|
|
494
|
415
|
#if ENABLED(FWRETRACT)
|
495
|
|
- case 207: M207(); break; // M207: Set Retract Length, Feedrate, and Z lift
|
496
|
|
- case 208: M208(); break; // M208: Set Recover (unretract) Additional Length and Feedrate
|
497
|
|
- case 209: if (MIN_AUTORETRACT <= MAX_AUTORETRACT) M209(); break; // M209: Turn Automatic Retract Detection on/off
|
|
416
|
+ case 207: M207(); break; // M207: Set Retract Length, Feedrate, and Z lift
|
|
417
|
+ case 208: M208(); break; // M208: Set Recover (unretract) Additional Length and Feedrate
|
|
418
|
+ case 209:
|
|
419
|
+ if (MIN_AUTORETRACT <= MAX_AUTORETRACT) M209(); // M209: Turn Automatic Retract Detection on/off
|
|
420
|
+ break;
|
498
|
421
|
#endif
|
499
|
422
|
|
500
|
|
- case 211: M211(); break; // M211: Enable, Disable, and/or Report software endstops
|
|
423
|
+ case 211: M211(); break; // M211: Enable, Disable, and/or Report software endstops
|
501
|
424
|
|
502
|
425
|
#if HOTENDS > 1
|
503
|
|
- case 218: // M218: Set a tool offset
|
504
|
|
- M218();
|
505
|
|
- break;
|
|
426
|
+ case 218: M218(); break; // M218: Set a tool offset
|
506
|
427
|
#endif
|
507
|
428
|
|
508
|
|
- case 220: M220(); break; // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD)
|
509
|
|
-
|
510
|
|
- case 221: // M221: Set Flow Percentage
|
511
|
|
- M221();
|
512
|
|
- break;
|
513
|
|
-
|
514
|
|
- case 226: M226(); break; // M226: Wait until a pin reaches a state
|
|
429
|
+ case 220: M220(); break; // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD)
|
|
430
|
+ case 221: M221(); break; // M221: Set Flow Percentage
|
|
431
|
+ case 226: M226(); break; // M226: Wait until a pin reaches a state
|
515
|
432
|
|
516
|
433
|
#if HAS_SERVOS
|
517
|
|
- case 280: M280(); break; // M280: Set servo position absolute
|
|
434
|
+ case 280: M280(); break; // M280: Set servo position absolute
|
518
|
435
|
#endif
|
519
|
436
|
|
520
|
437
|
#if ENABLED(BABYSTEPPING)
|
521
|
|
- case 290: M290(); break; // M290: Babystepping
|
|
438
|
+ case 290: M290(); break; // M290: Babystepping
|
522
|
439
|
#endif
|
523
|
440
|
|
524
|
441
|
#if HAS_BUZZER
|
525
|
|
- case 300: M300(); break; // M300: Play beep tone
|
|
442
|
+ case 300: M300(); break; // M300: Play beep tone
|
526
|
443
|
#endif
|
527
|
444
|
|
528
|
445
|
#if ENABLED(PIDTEMP)
|
529
|
|
- case 301: M301(); break; // M301: Set hotend PID parameters
|
|
446
|
+ case 301: M301(); break; // M301: Set hotend PID parameters
|
530
|
447
|
#endif
|
531
|
448
|
|
532
|
449
|
#if ENABLED(PIDTEMPBED)
|
533
|
|
- case 304: M304(); break; // M304: Set bed PID parameters
|
|
450
|
+ case 304: M304(); break; // M304: Set bed PID parameters
|
534
|
451
|
#endif
|
535
|
452
|
|
536
|
453
|
#if defined(CHDK) || HAS_PHOTOGRAPH
|
537
|
|
- case 240: M240(); break; // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
|
|
454
|
+ case 240: M240(); break; // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
|
538
|
455
|
#endif
|
539
|
456
|
|
540
|
457
|
#if HAS_LCD_CONTRAST
|
541
|
|
- case 250: M250(); break; // M250: Set LCD contrast
|
|
458
|
+ case 250: M250(); break; // M250: Set LCD contrast
|
542
|
459
|
#endif
|
543
|
460
|
|
544
|
461
|
#if ENABLED(EXPERIMENTAL_I2CBUS)
|
545
|
|
- case 260: M260(); break; // M260: Send data to an i2c slave
|
546
|
|
- case 261: M261(); break; // M261: Request data from an i2c slave
|
|
462
|
+ case 260: M260(); break; // M260: Send data to an i2c slave
|
|
463
|
+ case 261: M261(); break; // M261: Request data from an i2c slave
|
547
|
464
|
#endif
|
548
|
465
|
|
549
|
466
|
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
550
|
|
- case 302: M302(); break; // M302: Allow cold extrudes (set the minimum extrude temperature)
|
|
467
|
+ case 302: M302(); break; // M302: Allow cold extrudes (set the minimum extrude temperature)
|
551
|
468
|
#endif
|
552
|
469
|
|
553
|
|
- case 303: // M303: PID autotune
|
554
|
|
- M303();
|
555
|
|
- break;
|
|
470
|
+ case 303: M303(); break; // M303: PID autotune
|
556
|
471
|
|
557
|
472
|
#if ENABLED(MORGAN_SCARA)
|
558
|
|
- case 360: if (M360()) return; break; // M360: SCARA Theta pos1
|
559
|
|
- case 361: if (M361()) return; break; // M361: SCARA Theta pos2
|
560
|
|
- case 362: if (M362()) return; break; // M362: SCARA Psi pos1
|
561
|
|
- case 363: if (M363()) return; break; // M363: SCARA Psi pos2
|
562
|
|
- case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
|
|
473
|
+ case 360: if (M360()) return; break; // M360: SCARA Theta pos1
|
|
474
|
+ case 361: if (M361()) return; break; // M361: SCARA Theta pos2
|
|
475
|
+ case 362: if (M362()) return; break; // M362: SCARA Psi pos1
|
|
476
|
+ case 363: if (M363()) return; break; // M363: SCARA Psi pos2
|
|
477
|
+ case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
|
563
|
478
|
#endif
|
564
|
479
|
|
565
|
480
|
#if ENABLED(EXT_SOLENOID)
|
566
|
|
- case 380: M380(); break; // M380: Activate solenoid on active extruder
|
567
|
|
- case 381: M381(); break; // M381: Disable all solenoids
|
|
481
|
+ case 380: M380(); break; // M380: Activate solenoid on active extruder
|
|
482
|
+ case 381: M381(); break; // M381: Disable all solenoids
|
568
|
483
|
#endif
|
569
|
484
|
|
570
|
|
- case 400: M400(); break; // M400: Finish all moves
|
|
485
|
+ case 400: M400(); break; // M400: Finish all moves
|
571
|
486
|
|
572
|
487
|
#if HAS_BED_PROBE
|
573
|
|
- case 401: M401(); break; // M401: Deploy probe
|
574
|
|
- case 402: M402(); break; // M402: Stow probe
|
|
488
|
+ case 401: M401(); break; // M401: Deploy probe
|
|
489
|
+ case 402: M402(); break; // M402: Stow probe
|
575
|
490
|
#endif
|
576
|
491
|
|
577
|
492
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
578
|
|
- case 404: // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
|
579
|
|
- M404();
|
580
|
|
- break;
|
581
|
|
- case 405: // M405: Turn on filament sensor for control
|
582
|
|
- M405();
|
583
|
|
- break;
|
584
|
|
- case 406: // M406: Turn off filament sensor for control
|
585
|
|
- M406();
|
586
|
|
- break;
|
587
|
|
- case 407: // M407: Display measured filament diameter
|
588
|
|
- M407();
|
589
|
|
- break;
|
590
|
|
- #endif // FILAMENT_WIDTH_SENSOR
|
|
493
|
+ case 404: M404(); break; // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
|
|
494
|
+ case 405: M405(); break; // M405: Turn on filament sensor for control
|
|
495
|
+ case 406: M406(); break; // M406: Turn off filament sensor for control
|
|
496
|
+ case 407: M407(); break; // M407: Display measured filament diameter
|
|
497
|
+ #endif
|
591
|
498
|
|
592
|
499
|
#if HAS_LEVELING
|
593
|
|
- case 420: // M420: Enable/Disable Bed Leveling
|
594
|
|
- M420();
|
595
|
|
- break;
|
|
500
|
+ case 420: M420(); break; // M420: Enable/Disable Bed Leveling
|
596
|
501
|
#endif
|
597
|
502
|
|
598
|
503
|
#if HAS_MESH
|
599
|
|
- case 421: // M421: Set a Mesh Bed Leveling Z coordinate
|
600
|
|
- M421();
|
601
|
|
- break;
|
|
504
|
+ case 421: M421(); break; // M421: Set a Mesh Bed Leveling Z coordinate
|
602
|
505
|
#endif
|
603
|
506
|
|
604
|
507
|
#if HAS_M206_COMMAND
|
605
|
|
- case 428: M428(); break; // M428: Apply current_position to home_offset
|
|
508
|
+ case 428: M428(); break; // M428: Apply current_position to home_offset
|
606
|
509
|
#endif
|
607
|
510
|
|
608
|
|
- case 500: M500(); break; // M500: Store settings in EEPROM
|
609
|
|
- case 501: M501(); break; // M501: Read settings from EEPROM
|
610
|
|
- case 502: M502(); break; // M502: Revert to default settings
|
|
511
|
+ case 500: M500(); break; // M500: Store settings in EEPROM
|
|
512
|
+ case 501: M501(); break; // M501: Read settings from EEPROM
|
|
513
|
+ case 502: M502(); break; // M502: Revert to default settings
|
611
|
514
|
#if DISABLED(DISABLE_M503)
|
612
|
|
- case 503: M503(); break; // M503: print settings currently in memory
|
|
515
|
+ case 503: M503(); break; // M503: print settings currently in memory
|
613
|
516
|
#endif
|
614
|
517
|
#if ENABLED(EEPROM_SETTINGS)
|
615
|
|
- case 504: M504(); break; // M504: Validate EEPROM contents
|
|
518
|
+ case 504: M504(); break; // M504: Validate EEPROM contents
|
616
|
519
|
#endif
|
617
|
520
|
|
618
|
521
|
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
619
|
|
- case 540: M540(); break; // M540: Set abort on endstop hit for SD printing
|
|
522
|
+ case 540: M540(); break; // M540: Set abort on endstop hit for SD printing
|
620
|
523
|
#endif
|
621
|
524
|
|
622
|
525
|
#if HAS_BED_PROBE
|
623
|
|
- case 851: // M851: Set Z Probe Z Offset
|
624
|
|
- M851();
|
625
|
|
- break;
|
626
|
|
- #endif // HAS_BED_PROBE
|
|
526
|
+ case 851: M851(); break; // M851: Set Z Probe Z Offset
|
|
527
|
+ #endif
|
627
|
528
|
|
628
|
529
|
#if ENABLED(SKEW_CORRECTION_GCODE)
|
629
|
|
- case 852: // M852: Set Skew factors
|
630
|
|
- M852();
|
631
|
|
- break;
|
|
530
|
+ case 852: M852(); break; // M852: Set Skew factors
|
632
|
531
|
#endif
|
633
|
532
|
|
634
|
533
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
635
|
|
- case 600: M600(); break; // M600: Pause for Filament Change
|
636
|
|
- case 603: M603(); break; // M603: Configure Filament Change
|
637
|
|
- #endif // ADVANCED_PAUSE_FEATURE
|
|
534
|
+ case 600: M600(); break; // M600: Pause for Filament Change
|
|
535
|
+ case 603: M603(); break; // M603: Configure Filament Change
|
|
536
|
+ #endif
|
638
|
537
|
|
639
|
538
|
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
640
|
|
- case 605: M605(); break; // M605: Set Dual X Carriage movement mode
|
|
539
|
+ case 605: M605(); break; // M605: Set Dual X Carriage movement mode
|
641
|
540
|
#endif
|
642
|
541
|
|
643
|
542
|
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
644
|
|
- case 701: M701(); break; // M701: Load Filament
|
645
|
|
- case 702: M702(); break; // M702: Unload Filament
|
|
543
|
+ case 701: M701(); break; // M701: Load Filament
|
|
544
|
+ case 702: M702(); break; // M702: Unload Filament
|
646
|
545
|
#endif
|
647
|
546
|
|
648
|
547
|
#if ENABLED(LIN_ADVANCE)
|
649
|
|
- case 900: M900(); break; // M900: Set advance K factor.
|
|
548
|
+ case 900: M900(); break; // M900: Set advance K factor.
|
650
|
549
|
#endif
|
651
|
550
|
|
652
|
551
|
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT)
|
653
|
|
- case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
|
|
552
|
+ case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
|
654
|
553
|
#if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
|
655
|
|
- case 908: M908(); break; // M908: Control digital trimpot directly.
|
656
|
|
- #if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF
|
657
|
|
- case 909: M909(); break; // M909: Print digipot/DAC current value
|
658
|
|
- case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM
|
|
554
|
+ case 908: M908(); break; // M908: Control digital trimpot directly.
|
|
555
|
+ #if ENABLED(DAC_STEPPER_CURRENT)
|
|
556
|
+ case 909: M909(); break; // M909: Print digipot/DAC current value
|
|
557
|
+ case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM
|
659
|
558
|
#endif
|
660
|
559
|
#endif
|
661
|
560
|
#endif
|
|
@@ -664,51 +563,49 @@ void GcodeSuite::process_parsed_command() {
|
664
|
563
|
#if ENABLED(TMC_DEBUG)
|
665
|
564
|
case 122: M122(); break;
|
666
|
565
|
#endif
|
667
|
|
- case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E
|
668
|
|
- case 911: M911(); break; // M911: Report TMC2130 prewarn triggered flags
|
669
|
|
- case 912: M912(); break; // M912: Clear TMC2130 prewarn triggered flags
|
|
566
|
+ case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E
|
|
567
|
+ case 911: M911(); break; // M911: Report TMC2130 prewarn triggered flags
|
|
568
|
+ case 912: M912(); break; // M912: Clear TMC2130 prewarn triggered flags
|
670
|
569
|
#if ENABLED(HYBRID_THRESHOLD)
|
671
|
|
- case 913: M913(); break; // M913: Set HYBRID_THRESHOLD speed.
|
|
570
|
+ case 913: M913(); break; // M913: Set HYBRID_THRESHOLD speed.
|
672
|
571
|
#endif
|
673
|
572
|
#if ENABLED(SENSORLESS_HOMING)
|
674
|
|
- case 914: M914(); break; // M914: Set SENSORLESS_HOMING sensitivity.
|
|
573
|
+ case 914: M914(); break; // M914: Set SENSORLESS_HOMING sensitivity.
|
675
|
574
|
#endif
|
676
|
575
|
#if ENABLED(TMC_Z_CALIBRATION)
|
677
|
|
- case 915: M915(); break; // M915: TMC Z axis calibration.
|
|
576
|
+ case 915: M915(); break; // M915: TMC Z axis calibration.
|
678
|
577
|
#endif
|
679
|
578
|
#endif
|
680
|
579
|
|
681
|
580
|
#if HAS_MICROSTEPS
|
682
|
|
- case 350: M350(); break; // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
|
683
|
|
- case 351: M351(); break; // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
|
|
581
|
+ case 350: M350(); break; // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
|
|
582
|
+ case 351: M351(); break; // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
|
684
|
583
|
#endif
|
685
|
584
|
|
686
|
|
- case 355: M355(); break; // M355: Set case light brightness
|
|
585
|
+ case 355: M355(); break; // M355: Set case light brightness
|
687
|
586
|
|
688
|
587
|
#if ENABLED(DEBUG_GCODE_PARSER)
|
689
|
|
- case 800:
|
690
|
|
- parser.debug(); // GCode Parser Test for M
|
691
|
|
- break;
|
|
588
|
+ case 800: parser.debug(); break; // M800: GCode Parser Test for M
|
692
|
589
|
#endif
|
693
|
590
|
|
694
|
591
|
#if ENABLED(I2C_POSITION_ENCODERS)
|
695
|
|
- case 860: M860(); break; // M860: Report encoder module position
|
696
|
|
- case 861: M861(); break; // M861: Report encoder module status
|
697
|
|
- case 862: M862(); break; // M862: Perform axis test
|
698
|
|
- case 863: M863(); break; // M863: Calibrate steps/mm
|
699
|
|
- case 864: M864(); break; // M864: Change module address
|
700
|
|
- case 865: M865(); break; // M865: Check module firmware version
|
701
|
|
- case 866: M866(); break; // M866: Report axis error count
|
702
|
|
- case 867: M867(); break; // M867: Toggle error correction
|
703
|
|
- case 868: M868(); break; // M868: Set error correction threshold
|
704
|
|
- case 869: M869(); break; // M869: Report axis error
|
705
|
|
- #endif
|
706
|
|
-
|
707
|
|
- case 999: M999(); break; // M999: Restart after being Stopped
|
|
592
|
+ case 860: M860(); break; // M860: Report encoder module position
|
|
593
|
+ case 861: M861(); break; // M861: Report encoder module status
|
|
594
|
+ case 862: M862(); break; // M862: Perform axis test
|
|
595
|
+ case 863: M863(); break; // M863: Calibrate steps/mm
|
|
596
|
+ case 864: M864(); break; // M864: Change module address
|
|
597
|
+ case 865: M865(); break; // M865: Check module firmware version
|
|
598
|
+ case 866: M866(); break; // M866: Report axis error count
|
|
599
|
+ case 867: M867(); break; // M867: Toggle error correction
|
|
600
|
+ case 868: M868(); break; // M868: Set error correction threshold
|
|
601
|
+ case 869: M869(); break; // M869: Report axis error
|
|
602
|
+ #endif
|
|
603
|
+
|
|
604
|
+ case 999: M999(); break; // M999: Restart after being Stopped
|
708
|
605
|
}
|
709
|
606
|
break;
|
710
|
607
|
|
711
|
|
- case 'T': T(parser.codenum); break; // Tn: Tool Change
|
|
608
|
+ case 'T': T(parser.codenum); break; // Tn: Tool Change
|
712
|
609
|
|
713
|
610
|
default: parser.unknown_command_error();
|
714
|
611
|
}
|