Quellcode durchsuchen

Minor LCD cleanup, improvement

Scott Lahteine vor 3 Jahren
Ursprung
Commit
f445bc26e5

+ 6
- 10
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Datei anzeigen

@@ -826,7 +826,7 @@
826 826
     static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
827 827
 
828 828
     float unified_bed_leveling::measure_business_card_thickness(float in_height) {
829
-      TERN_(HAS_LCD_MENU, ui.capture());
829
+      ui.capture();
830 830
       save_ubl_active_state_and_disable();   // Disable bed level correction for probing
831 831
 
832 832
       do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
@@ -857,15 +857,13 @@
857 857
         SERIAL_ECHOLNPGM("mm thick.");
858 858
       }
859 859
 
860
-      ui.release();
861
-
862 860
       restore_ubl_active_state_and_leave();
863 861
 
864 862
       return thickness;
865 863
     }
866 864
 
867 865
     void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const float &z_clearance, const float &thick, const bool do_ubl_mesh_map) {
868
-      TERN_(HAS_LCD_MENU, ui.capture());
866
+      ui.capture();
869 867
 
870 868
       save_ubl_active_state_and_disable();  // No bed level correction so only raw data is obtained
871 869
       do_blocking_move_to_xy_z(current_position, z_clearance);
@@ -893,7 +891,7 @@
893 891
         do_blocking_move_to_z(z_clearance);
894 892
 
895 893
         KEEPALIVE_STATE(PAUSED_FOR_USER);
896
-        TERN_(HAS_LCD_MENU, ui.capture());
894
+        ui.capture();
897 895
 
898 896
         if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
899 897
 
@@ -907,7 +905,6 @@
907 905
         if (click_and_hold()) {
908 906
           SERIAL_ECHOLNPGM("\nMesh only partially populated.");
909 907
           do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
910
-          ui.release();
911 908
           return restore_ubl_active_state_and_leave();
912 909
         }
913 910
 
@@ -958,9 +955,9 @@
958 955
       save_ubl_active_state_and_disable();
959 956
 
960 957
       LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
961
-      TERN_(HAS_LCD_MENU, ui.capture());                    // Take over control of the LCD encoder
958
+      ui.capture();                                               // Take over control of the LCD encoder
962 959
 
963
-      do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
960
+      do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES);  // Move to the given XY with probe clearance
964 961
 
965 962
       TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset));  // Move Z to the given 'H' offset
966 963
 
@@ -1016,8 +1013,6 @@
1016 1013
 
1017 1014
       } while (lpos.x >= 0 && --g29_repetition_cnt > 0);
1018 1015
 
1019
-      ui.release();
1020
-
1021 1016
       if (do_ubl_mesh_map) display_map(g29_map_type);
1022 1017
       restore_ubl_active_state_and_leave();
1023 1018
 
@@ -1168,6 +1163,7 @@
1168 1163
   }
1169 1164
 
1170 1165
   void unified_bed_leveling::restore_ubl_active_state_and_leave() {
1166
+    TERN_(HAS_LCD_MENU, ui.release());
1171 1167
     #if ENABLED(UBL_DEVEL_DEBUGGING)
1172 1168
       if (--ubl_state_recursion_chk) {
1173 1169
         SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");

+ 9
- 7
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp Datei anzeigen

@@ -824,13 +824,9 @@ void MarlinUI::draw_status_screen() {
824 824
 
825 825
           #else // !HAS_DUAL_MIXING
826 826
 
827
-            if (TERN1(LCD_SHOW_E_TOTAL, !printingIsActive())) {
828
-              const xy_pos_t lpos = current_position.asLogical();
829
-              _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink);
830
-              lcd_put_wchar(' ');
831
-              _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink);
832
-            }
833
-            else {
827
+            const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive() || marlin_state == MF_SD_COMPLETE);
828
+
829
+            if (show_e_total) {
834 830
               #if ENABLED(LCD_SHOW_E_TOTAL)
835 831
                 char tmp[20];
836 832
                 const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
@@ -838,6 +834,12 @@ void MarlinUI::draw_status_screen() {
838 834
                 lcd_put_u8str(tmp);
839 835
               #endif
840 836
             }
837
+            else {
838
+              const xy_pos_t lpos = current_position.asLogical();
839
+              _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink);
840
+              lcd_put_wchar(' ');
841
+              _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink);
842
+            }
841 843
 
842 844
           #endif // !HAS_DUAL_MIXING
843 845
 

+ 11
- 11
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Datei anzeigen

@@ -414,7 +414,7 @@ void MarlinUI::draw_status_screen() {
414 414
     #endif
415 415
   #endif
416 416
 
417
-  const bool showxy = TERN1(LCD_SHOW_E_TOTAL, !printingIsActive());
417
+  const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive() || marlin_state == MF_SD_COMPLETE);
418 418
 
419 419
   // At the first page, generate new display values
420 420
   if (first_page) {
@@ -434,16 +434,16 @@ void MarlinUI::draw_status_screen() {
434 434
     const xyz_pos_t lpos = current_position.asLogical();
435 435
     strcpy(zstring, ftostr52sp(lpos.z));
436 436
 
437
-    if (showxy) {
438
-      strcpy(xstring, ftostr4sign(lpos.x));
439
-      strcpy(ystring, ftostr4sign(lpos.y));
440
-    }
441
-    else {
437
+    if (show_e_total) {
442 438
       #if ENABLED(LCD_SHOW_E_TOTAL)
443 439
         const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
444 440
         sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
445 441
       #endif
446 442
     }
443
+    else {
444
+      strcpy(xstring, ftostr4sign(lpos.x));
445
+      strcpy(ystring, ftostr4sign(lpos.y));
446
+    }
447 447
 
448 448
     #if ENABLED(FILAMENT_LCD_DISPLAY)
449 449
       strcpy(wstring, ftostr12ns(filwidth.measured_mm));
@@ -772,14 +772,14 @@ void MarlinUI::draw_status_screen() {
772 772
 
773 773
       #else
774 774
 
775
-        if (showxy) {
776
-          _draw_axis_value(X_AXIS, xstring, blink);
777
-          _draw_axis_value(Y_AXIS, ystring, blink);
778
-        }
779
-        else {
775
+        if (show_e_total) {
780 776
           _draw_axis_value(E_AXIS, xstring, true);
781 777
           lcd_put_u8str_P(PSTR("       "));
782 778
         }
779
+        else {
780
+          _draw_axis_value(X_AXIS, xstring, blink);
781
+          _draw_axis_value(Y_AXIS, ystring, blink);
782
+        }
783 783
 
784 784
       #endif
785 785
 

+ 20
- 18
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp Datei anzeigen

@@ -318,7 +318,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
318 318
 
319 319
   #endif // ADVANCED_PAUSE_FEATURE
320 320
 
321
-  // Set the colors for a menu item based on whether it is selected
321
+  // Mark a menu item and set font color if selected.
322
+  // Return 'false' if the item is not on screen.
322 323
   static bool mark_as_selected(const uint8_t row, const bool sel) {
323 324
     row_y1 = row * (MENU_FONT_HEIGHT) + 1;
324 325
     row_y2 = row_y1 + MENU_FONT_HEIGHT - 1;
@@ -330,15 +331,13 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
330 331
         u8g.drawHLine(0, row_y1 + 1, LCD_PIXEL_WIDTH);
331 332
         u8g.drawHLine(0, row_y2 + 2, LCD_PIXEL_WIDTH);
332 333
       #else
333
-        u8g.setColorIndex(1); // black on white
334
+        u8g.setColorIndex(1); // solid outline
334 335
         u8g.drawBox(0, row_y1 + 2, LCD_PIXEL_WIDTH, MENU_FONT_HEIGHT - 1);
335
-        u8g.setColorIndex(0); // white on black
336
+        u8g.setColorIndex(0); // inverted text
336 337
       #endif
337 338
     }
338 339
     #if DISABLED(MENU_HOLLOW_FRAME)
339
-      else {
340
-        u8g.setColorIndex(1); // unmarked text is black on white
341
-      }
340
+      else u8g.setColorIndex(1); // solid text
342 341
     #endif
343 342
 
344 343
     if (!PAGE_CONTAINS(row_y1, row_y2)) return false;
@@ -352,13 +351,15 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
352 351
 
353 352
     if (mark_as_selected(row, style & SS_INVERT)) {
354 353
 
355
-      u8g_uint_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
354
+      pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
356 355
 
357
-      if ((style & SS_CENTER) && !valstr) {
358
-        int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2;
359
-        while (--pad >= 0) { lcd_put_wchar(' '); n--; }
360
-      }
361
-      n = lcd_put_u8str_ind_P(pstr, itemIndex, LCD_WIDTH) * (MENU_FONT_WIDTH);
356
+      if ((style & SS_CENTER) && !valstr)
357
+        for (int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2; pad > 0; --pad) {
358
+          lcd_put_wchar(' ');
359
+          n -= MENU_FONT_WIDTH;
360
+        }
361
+
362
+      n = lcd_put_u8str_ind_P(pstr, itemIndex, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH);
362 363
       if (valstr) n -= lcd_put_u8str_max(valstr, n);
363 364
       while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
364 365
     }
@@ -367,7 +368,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
367 368
   // Draw a generic menu item
368 369
   void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char, const char post_char) {
369 370
     if (mark_as_selected(row, sel)) {
370
-      u8g_uint_t n = lcd_put_u8str_ind_P(pstr, itemIndex, LCD_WIDTH - 2) * (MENU_FONT_WIDTH);
371
+      pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, LCD_WIDTH - 1) * (MENU_FONT_WIDTH);
371 372
       while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
372 373
       lcd_put_wchar(LCD_PIXEL_WIDTH - (MENU_FONT_WIDTH), row_y2, post_char);
373 374
       lcd_put_wchar(' ');
@@ -380,7 +381,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
380 381
       const uint8_t vallen = (pgm ? utf8_strlen_P(data) : utf8_strlen((char*)data)),
381 382
                     pixelwidth = (pgm ? uxg_GetUtf8StrPixelWidthP(u8g.getU8g(), data) : uxg_GetUtf8StrPixelWidth(u8g.getU8g(), (char*)data));
382 383
 
383
-      u8g_uint_t n = lcd_put_u8str_ind_P(pstr, itemIndex, LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH);
384
+      pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH);
384 385
       if (vallen) {
385 386
         lcd_put_wchar(':');
386 387
         while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
@@ -440,8 +441,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
440 441
   }
441 442
 
442 443
   inline void draw_boxed_string(const u8g_uint_t x, const u8g_uint_t y, PGM_P const pstr, const bool inv) {
443
-    const u8g_uint_t len = utf8_strlen_P(pstr), bw = len * (MENU_FONT_WIDTH),
444
-                     bx = x * (MENU_FONT_WIDTH), by = (y + 1) * (MENU_FONT_HEIGHT);
444
+    const u8g_uint_t len = utf8_strlen_P(pstr),
445
+                      by = (y + 1) * (MENU_FONT_HEIGHT);
446
+    const pixel_len_t bw = len * (MENU_FONT_WIDTH), bx = x * (MENU_FONT_WIDTH);
445 447
     if (inv) {
446 448
       u8g.setColorIndex(1);
447 449
       u8g.drawBox(bx - 1, by - (MENU_FONT_ASCENT) + 1, bw + 2, MENU_FONT_HEIGHT - 1);
@@ -463,8 +465,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
463 465
       if (mark_as_selected(row, sel)) {
464 466
         if (isDir) lcd_put_wchar(LCD_STR_FOLDER[0]);
465 467
         constexpr uint8_t maxlen = LCD_WIDTH - 1;
466
-        const u8g_uint_t pixw = maxlen * (MENU_FONT_WIDTH);
467
-        u8g_uint_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw);
468
+        const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH);
469
+        pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw);
468 470
         while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
469 471
       }
470 472
     }

+ 11
- 17
Marlin/src/lcd/menu/menu_motion.cpp Datei anzeigen

@@ -46,14 +46,9 @@
46 46
   #include "../../feature/bedlevel/bedlevel.h"
47 47
 #endif
48 48
 
49
-extern millis_t manual_move_start_time;
50
-extern int8_t manual_move_axis;
51 49
 #if ENABLED(MANUAL_E_MOVES_RELATIVE)
52 50
   float manual_move_e_origin = 0;
53 51
 #endif
54
-#if IS_KINEMATIC
55
-  extern float manual_move_offset;
56
-#endif
57 52
 
58 53
 //
59 54
 // Tell ui.update() to start a move to current_position" after a short delay.
@@ -66,8 +61,8 @@ inline void manual_move_to_current(AxisEnum axis
66 61
   #if MULTI_MANUAL
67 62
     if (axis == E_AXIS) ui.manual_move_e_index = eindex >= 0 ? eindex : active_extruder;
68 63
   #endif
69
-  manual_move_start_time = millis() + (move_menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves
70
-  manual_move_axis = (int8_t)axis;
64
+  ui.manual_move_start_time = millis() + (move_menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves
65
+  ui.manual_move_axis = (int8_t)axis;
71 66
 }
72 67
 
73 68
 //
@@ -112,11 +107,11 @@ static void _lcd_move_xyz(PGM_P const name, const AxisEnum axis) {
112 107
     // Get the new position
113 108
     const float diff = float(int32_t(ui.encoderPosition)) * move_menu_scale;
114 109
     #if IS_KINEMATIC
115
-      manual_move_offset += diff;
110
+      ui.manual_move_offset += diff;
116 111
       if (int32_t(ui.encoderPosition) < 0)
117
-        NOLESS(manual_move_offset, min - current_position[axis]);
112
+        NOLESS(ui.manual_move_offset, min - current_position[axis]);
118 113
       else
119
-        NOMORE(manual_move_offset, max - current_position[axis]);
114
+        NOMORE(ui.manual_move_offset, max - current_position[axis]);
120 115
     #else
121 116
       current_position[axis] += diff;
122 117
       if (int32_t(ui.encoderPosition) < 0)
@@ -130,11 +125,10 @@ static void _lcd_move_xyz(PGM_P const name, const AxisEnum axis) {
130 125
   }
131 126
   ui.encoderPosition = 0;
132 127
   if (ui.should_draw()) {
133
-    const float pos = NATIVE_TO_LOGICAL(ui.processing_manual_move ? destination[axis] : current_position[axis]
134
-      #if IS_KINEMATIC
135
-        + manual_move_offset
136
-      #endif
137
-    , axis);
128
+    const float pos = NATIVE_TO_LOGICAL(
129
+      ui.processing_manual_move ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move_offset),
130
+      axis
131
+    );
138 132
     MenuEditItemBase::draw_edit_screen(name, move_menu_scale >= 0.1f ? ftostr41sign(pos) : ftostr43sign(pos));
139 133
   }
140 134
 }
@@ -149,7 +143,7 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
149 143
     if (ui.encoderPosition) {
150 144
       if (!ui.processing_manual_move) {
151 145
         const float diff = float(int32_t(ui.encoderPosition)) * move_menu_scale;
152
-        TERN(IS_KINEMATIC, manual_move_offset, current_position.e) += diff;
146
+        TERN(IS_KINEMATIC, ui.manual_move_offset, current_position.e) += diff;
153 147
         manual_move_to_current(E_AXIS
154 148
           #if MULTI_MANUAL
155 149
             , eindex
@@ -166,7 +160,7 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
166 160
       MenuEditItemBase::draw_edit_screen(
167 161
         GET_TEXT(TERN(MULTI_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)),
168 162
         ftostr41sign(current_position.e
169
-          + TERN0(IS_KINEMATIC, manual_move_offset)
163
+          + TERN0(IS_KINEMATIC, ui.manual_move_offset)
170 164
           - TERN0(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin)
171 165
         )
172 166
       );

+ 7
- 17
Marlin/src/lcd/menu/menu_ubl.cpp Datei anzeigen

@@ -31,6 +31,7 @@
31 31
 #include "menu.h"
32 32
 #include "../../gcode/gcode.h"
33 33
 #include "../../gcode/queue.h"
34
+#include "../../module/motion.h"
34 35
 #include "../../module/planner.h"
35 36
 #include "../../module/configuration_store.h"
36 37
 #include "../../feature/bedlevel/bedlevel.h"
@@ -356,24 +357,16 @@ void _lcd_ubl_build_mesh() {
356 357
 }
357 358
 
358 359
 /**
359
- * UBL Load Mesh Command
360
+ * UBL Load / Save Mesh Commands
360 361
  */
361
-void _lcd_ubl_load_mesh_cmd() {
362
+inline void _lcd_ubl_load_save_cmd(const char loadsave, PGM_P const msg) {
362 363
   char ubl_lcd_gcode[40];
363
-  sprintf_P(ubl_lcd_gcode, PSTR("G29 L%i\nM117 "), ubl_storage_slot);
364
-  sprintf_P(&ubl_lcd_gcode[strlen(ubl_lcd_gcode)], GET_TEXT(MSG_MESH_LOADED), ubl_storage_slot);
365
-  gcode.process_subcommands_now(ubl_lcd_gcode);
366
-}
367
-
368
-/**
369
- * UBL Save Mesh Command
370
- */
371
-void _lcd_ubl_save_mesh_cmd() {
372
-  char ubl_lcd_gcode[40];
373
-  sprintf_P(ubl_lcd_gcode, PSTR("G29 S%i\nM117 "), ubl_storage_slot);
374
-  sprintf_P(&ubl_lcd_gcode[strlen(ubl_lcd_gcode)], GET_TEXT(MSG_MESH_SAVED), ubl_storage_slot);
364
+  sprintf_P(ubl_lcd_gcode, PSTR("G29 %c%i\nM117 "), loadsave, ubl_storage_slot);
365
+  sprintf_P(&ubl_lcd_gcode[strlen(ubl_lcd_gcode)], msg, ubl_storage_slot);
375 366
   gcode.process_subcommands_now(ubl_lcd_gcode);
376 367
 }
368
+void _lcd_ubl_load_mesh_cmd() { _lcd_ubl_load_save_cmd('L', GET_TEXT(MSG_MESH_LOADED)); }
369
+void _lcd_ubl_save_mesh_cmd() { _lcd_ubl_load_save_cmd('S', GET_TEXT(MSG_MESH_SAVED)); }
377 370
 
378 371
 /**
379 372
  * UBL Mesh Storage submenu
@@ -444,9 +437,6 @@ void ubl_map_move_to_xy() {
444 437
 /**
445 438
  * UBL LCD "radar" map
446 439
  */
447
-void set_current_from_steppers_for_axis(const AxisEnum axis);
448
-void sync_plan_position();
449
-
450 440
 void _lcd_ubl_output_map_lcd() {
451 441
 
452 442
   static int16_t step_scaler = 0;

+ 5
- 5
Marlin/src/lcd/ultralcd.cpp Datei anzeigen

@@ -637,12 +637,12 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
637 637
 
638 638
 #if HAS_LCD_MENU
639 639
 
640
-  int8_t manual_move_axis = (int8_t)NO_AXIS;
641
-  millis_t manual_move_start_time = 0;
640
+  int8_t MarlinUI::manual_move_axis = (int8_t)NO_AXIS;
641
+  millis_t MarlinUI::manual_move_start_time = 0;
642 642
 
643 643
   #if IS_KINEMATIC
644 644
     bool MarlinUI::processing_manual_move = false;
645
-    float manual_move_offset = 0;
645
+    float MarlinUI::manual_move_offset = 0;
646 646
   #endif
647 647
 
648 648
   #if MULTI_MANUAL
@@ -905,8 +905,8 @@ void MarlinUI::update() {
905 905
       }
906 906
     #endif
907 907
 
908
-    // then we want to use 1/2 of the time only.
909
-    uint16_t bbr2 = planner.block_buffer_runtime() >> 1;
908
+    // Then we want to use only 50% of the time
909
+    const uint16_t bbr2 = planner.block_buffer_runtime() >> 1;
910 910
 
911 911
     if ((should_draw() || drawing_screen) && (!bbr2 || bbr2 > max_display_update_time)) {
912 912
 

+ 4
- 0
Marlin/src/lcd/ultralcd.h Datei anzeigen

@@ -494,7 +494,11 @@ public:
494 494
       static void enable_encoder_multiplier(const bool onoff);
495 495
     #endif
496 496
 
497
+    static int8_t manual_move_axis;
498
+    static millis_t manual_move_start_time;
499
+
497 500
     #if IS_KINEMATIC
501
+      static float manual_move_offset;
498 502
       static bool processing_manual_move;
499 503
     #else
500 504
       static constexpr bool processing_manual_move = false;

+ 1
- 1
Marlin/src/module/planner.cpp Datei anzeigen

@@ -2039,7 +2039,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2039 2039
   const uint8_t moves_queued = nonbusy_movesplanned();
2040 2040
 
2041 2041
   // Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill
2042
-  #if EITHER(SLOWDOWN, ULTRA_LCD) || defined(XY_FREQUENCY_LIMIT)
2042
+  #if EITHER(SLOWDOWN, HAS_SPI_LCD) || defined(XY_FREQUENCY_LIMIT)
2043 2043
     // Segment time im micro seconds
2044 2044
     int32_t segment_time_us = LROUND(1000000.0f / inverse_secs);
2045 2045
   #endif

Laden…
Abbrechen
Speichern