Block during move in UBL mesh edit (#17670)

2.0.x
FilippoR 5 years ago committed by GitHub
parent 630b4ecfff
commit 9fa5119333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -437,16 +437,10 @@ void ubl_map_move_to_xy() {
void set_current_from_steppers_for_axis(const AxisEnum axis);
void sync_plan_position();
void _lcd_hard_stop() {
const screenFunc_t old_screen = ui.currentScreen;
lcd_limbo();
planner.quick_stop();
ui.currentScreen = old_screen;
set_current_from_steppers_for_axis(ALL_AXES);
sync_plan_position();
}
void _lcd_ubl_output_map_lcd() {
if (planner.movesplanned()) return;
static int16_t step_scaler = 0;
if (ui.use_click()) return _lcd_ubl_map_lcd_edit_cmd();
@ -458,11 +452,7 @@ void _lcd_ubl_output_map_lcd() {
ui.refresh(LCDVIEW_REDRAW_NOW);
}
#if IS_KINEMATIC
#define KEEP_LOOPING true // Loop until a valid point is found
#else
#define KEEP_LOOPING false
#endif
#define KEEP_LOOPING ENABLED(IS_KINEMATIC) // Loop until a valid point is found
do {
// Encoder to the right (++)
@ -495,10 +485,6 @@ void _lcd_ubl_output_map_lcd() {
if (ui.should_draw()) {
ui.ubl_plot(x_plot, y_plot);
if (planner.movesplanned()) // If the nozzle is already moving, cancel the move.
_lcd_hard_stop();
ubl_map_move_to_xy(); // Move to new location
}
}
@ -511,6 +497,7 @@ void _lcd_ubl_output_map_lcd_cmd() {
set_all_unhomed();
queue.inject_P(G28_STR);
}
if (planner.movesplanned()) return;
ui.goto_screen(_lcd_ubl_map_homing);
}

Loading…
Cancel
Save