Browse Source

Custom Nozzle Wipe (#18736)

InsanityAutomation 4 years ago
parent
commit
b4b19aef7f
No account linked to committer's email address
2 changed files with 11 additions and 0 deletions
  1. 4
    0
      Marlin/Configuration.h
  2. 7
    0
      Marlin/src/gcode/feature/clean/G12.cpp

+ 4
- 0
Marlin/Configuration.h View File

@@ -1595,6 +1595,10 @@
1595 1595
 
1596 1596
   // Enable for a purge/clean station that's always at the gantry height (thus no Z move)
1597 1597
   //#define NOZZLE_CLEAN_NO_Z
1598
+
1599
+  // Explicit wipe G-code script applies to a G12 with no arguments.
1600
+  //#define WIPE_SEQUENCE_COMMANDS "G1 X-17 Y25 Z10 F4000\nG1 Z1\nM114\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 Z15\nM400\nG0 X-10.0 Y-9.0"
1601
+
1598 1602
 #endif
1599 1603
 
1600 1604
 /**

+ 7
- 0
Marlin/src/gcode/feature/clean/G12.cpp View File

@@ -47,6 +47,13 @@ void GcodeSuite::G12() {
47 47
   // Don't allow nozzle cleaning without homing first
48 48
   if (axis_unhomed_error()) return;
49 49
 
50
+  #ifdef WIPE_SEQUENCE_COMMANDS
51
+    if (!parser.seen_any()) {
52
+      gcode.process_subcommands_now_P(PSTR(WIPE_SEQUENCE_COMMANDS));
53
+      return;
54
+    }
55
+  #endif
56
+
50 57
   const uint8_t pattern = parser.ushortval('P', 0),
51 58
                 strokes = parser.ushortval('S', NOZZLE_CLEAN_STROKES),
52 59
                 objects = parser.ushortval('T', NOZZLE_CLEAN_TRIANGLES);

Loading…
Cancel
Save