🩹 Allow Nozzle Wipe odd linear count (#27952)

This commit is contained in:
Darsey Litzenberger
2025-07-18 23:48:08 -06:00
committed by GitHub
parent 28839c60da
commit 02e5225e10
+12 -14
View File
@@ -51,25 +51,23 @@ Nozzle nozzle;
const xyz_pos_t oldpos = current_position;
#endif
// 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
// Move Z (and XY) to the starting point, if needed
#if DISABLED(NOZZLE_CLEAN_NO_Z)
do_blocking_move_to(start);
#endif
// Start the stroke pattern
for (uint8_t i = 0; i < strokes >> 1; ++i) {
// Run the stroke pattern
for (uint8_t i = 0; i <= strokes; ++i) {
#if ENABLED(NOZZLE_CLEAN_NO_Y)
do_blocking_move_to_x(end.x);
do_blocking_move_to_x(start.x);
if (i & 1)
do_blocking_move_to_x(end.x);
else
do_blocking_move_to_x(start.x);
#else
do_blocking_move_to_xy(end);
do_blocking_move_to_xy(start);
if (i & 1)
do_blocking_move_to_x(end);
else
do_blocking_move_to_x(start);
#endif
}