NOZZLE_CLEAN_NO_Y (#18870)

This commit is contained in:
Mathew Winters 2020-08-23 09:20:37 +12:00 committed by Scott Lahteine
parent 05d2bb0df5
commit fe89f5fdff
2 changed files with 16 additions and 4 deletions

View File

@ -1604,9 +1604,12 @@
// Move the nozzle to the initial position after cleaning
#define NOZZLE_CLEAN_GOBACK
// Enable for a purge/clean station that's always at the gantry height (thus no Z move)
// For a purge/clean station that's always at the gantry height (thus no Z move)
//#define NOZZLE_CLEAN_NO_Z
// For a purge/clean station mounted on the X axis
//#define NOZZLE_CLEAN_NO_Y
// 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"

View File

@ -46,15 +46,24 @@ Nozzle nozzle;
// Move to the starting point
#if ENABLED(NOZZLE_CLEAN_NO_Z)
#if ENABLED(NOZZLE_CLEAN_NO_Y)
do_blocking_move_to_x(start.x);
#else
do_blocking_move_to_xy(start);
#endif
#else
do_blocking_move_to(start);
#endif
// Start the stroke pattern
LOOP_L_N(i, strokes >> 1) {
#if ENABLED(NOZZLE_CLEAN_NO_Y)
do_blocking_move_to_x(end.x);
do_blocking_move_to_x(start.x);
#else
do_blocking_move_to_xy(end);
do_blocking_move_to_xy(start);
#endif
}
TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(oldpos));