Ver código fonte

Block during move in UBL mesh edit (#17670)

FilippoR 4 anos atrás
pai
commit
9fa5119333
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 5 adições e 18 exclusões
  1. 5
    18
      Marlin/src/lcd/menu/menu_ubl.cpp

+ 5
- 18
Marlin/src/lcd/menu/menu_ubl.cpp Ver arquivo

@@ -437,16 +437,10 @@ void ubl_map_move_to_xy() {
437 437
 void set_current_from_steppers_for_axis(const AxisEnum axis);
438 438
 void sync_plan_position();
439 439
 
440
-void _lcd_hard_stop() {
441
-  const screenFunc_t old_screen = ui.currentScreen;
442
-  lcd_limbo();
443
-  planner.quick_stop();
444
-  ui.currentScreen = old_screen;
445
-  set_current_from_steppers_for_axis(ALL_AXES);
446
-  sync_plan_position();
447
-}
448
-
449 440
 void _lcd_ubl_output_map_lcd() {
441
+
442
+  if (planner.movesplanned()) return;
443
+
450 444
   static int16_t step_scaler = 0;
451 445
 
452 446
   if (ui.use_click()) return _lcd_ubl_map_lcd_edit_cmd();
@@ -458,11 +452,7 @@ void _lcd_ubl_output_map_lcd() {
458 452
     ui.refresh(LCDVIEW_REDRAW_NOW);
459 453
   }
460 454
 
461
-  #if IS_KINEMATIC
462
-    #define KEEP_LOOPING true   // Loop until a valid point is found
463
-  #else
464
-    #define KEEP_LOOPING false
465
-  #endif
455
+  #define KEEP_LOOPING ENABLED(IS_KINEMATIC) // Loop until a valid point is found
466 456
 
467 457
   do {
468 458
     // Encoder to the right (++)
@@ -495,10 +485,6 @@ void _lcd_ubl_output_map_lcd() {
495 485
 
496 486
   if (ui.should_draw()) {
497 487
     ui.ubl_plot(x_plot, y_plot);
498
-
499
-    if (planner.movesplanned()) // If the nozzle is already moving, cancel the move.
500
-      _lcd_hard_stop();
501
-
502 488
     ubl_map_move_to_xy();       // Move to new location
503 489
   }
504 490
 }
@@ -511,6 +497,7 @@ void _lcd_ubl_output_map_lcd_cmd() {
511 497
     set_all_unhomed();
512 498
     queue.inject_P(G28_STR);
513 499
   }
500
+  if (planner.movesplanned()) return;
514 501
   ui.goto_screen(_lcd_ubl_map_homing);
515 502
 }
516 503
 

Carregando…
Cancelar
Salvar