More Nozzle Park move options (#23158)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
John Robertson
2022-02-11 21:04:47 +00:00
committed by Scott Lahteine
parent 1b2715ccf2
commit 428b67db31
3 changed files with 17 additions and 7 deletions

View File

@ -609,6 +609,10 @@
#error "LCD_SCREEN_ROT_270 is now LCD_SCREEN_ROTATE with a value of 270."
#elif defined(DEFAULT_LCD_BRIGHTNESS)
#error "DEFAULT_LCD_BRIGHTNESS is now LCD_BRIGHTNESS_DEFAULT."
#elif defined(NOZZLE_PARK_X_ONLY)
#error "NOZZLE_PARK_X_ONLY is now NOZZLE_PARK_MOVE 1."
#elif defined(NOZZLE_PARK_Y_ONLY)
#error "NOZZLE_PARK_X_ONLY is now NOZZLE_PARK_MOVE 2."
#endif
constexpr float arm[] = AXIS_RELATIVE_MODES;

View File

@ -254,11 +254,18 @@ Nozzle nozzle;
break;
}
do_blocking_move_to_xy(
TERN(NOZZLE_PARK_Y_ONLY, current_position, park).x,
TERN(NOZZLE_PARK_X_ONLY, current_position, park).y,
fr_xy
);
#ifndef NOZZLE_PARK_MOVE
#define NOZZLE_PARK_MOVE 0
#endif
switch (NOZZLE_PARK_MOVE) {
case 0: do_blocking_move_to_xy(park, fr_xy); break;
case 1: do_blocking_move_to_x(park.x, fr_xy); break;
case 2: do_blocking_move_to_y(park.y, fr_xy); break;
case 3: do_blocking_move_to_x(park.x, fr_xy);
do_blocking_move_to_y(park.y, fr_xy); break;
case 4: do_blocking_move_to_y(park.y, fr_xy);
do_blocking_move_to_x(park.x, fr_xy); break;
}
report_current_position();
}