Custom Nozzle Wipe (#18736)

This commit is contained in:
InsanityAutomation 2020-07-22 02:42:44 -04:00 committed by GitHub
parent 748c8a7ecd
commit b4b19aef7f
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -1595,6 +1595,10 @@
// Enable for a purge/clean station that's always at the gantry height (thus no Z move) // Enable for a purge/clean station that's always at the gantry height (thus no Z move)
//#define NOZZLE_CLEAN_NO_Z //#define NOZZLE_CLEAN_NO_Z
// Explicit wipe G-code script applies to a G12 with no arguments.
//#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"
#endif #endif
/** /**

View file

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