Procházet zdrojové kódy

UBL radar map corrections

Tannoo před 7 roky
rodič
revize
8e0f3b7eba
2 změnil soubory, kde provedl 16 přidání a 11 odebrání
  1. 4
    9
      Marlin/ubl_G29.cpp
  2. 12
    2
      Marlin/ultralcd.cpp

+ 4
- 9
Marlin/ubl_G29.cpp Zobrazit soubor

@@ -45,9 +45,7 @@
45 45
     void lcd_mesh_edit_setup(float initial);
46 46
     float lcd_mesh_edit();
47 47
     void lcd_z_offset_edit_setup(float);
48
-    #if ENABLED(DOGLCD)
49
-      extern void _lcd_ubl_output_map_lcd();
50
-    #endif
48
+    extern void _lcd_ubl_output_map_lcd();
51 49
     float lcd_z_offset_edit();
52 50
   #endif
53 51
 
@@ -1522,7 +1520,7 @@
1522 1520
           idle();
1523 1521
         } while (!ubl_lcd_clicked());
1524 1522
 
1525
-        lcd_return_to_status();
1523
+        if (!ubl_lcd_map_control) lcd_return_to_status();
1526 1524
 
1527 1525
         // The technique used here generates a race condition for the encoder click.
1528 1526
         // It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune) or here.
@@ -1569,11 +1567,8 @@
1569 1567
       LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH);
1570 1568
       SERIAL_ECHOLNPGM("Done Editing Mesh");
1571 1569
 
1572
-      if (ubl_lcd_map_control) {
1573
-        #if ENABLED(DOGLCD)
1574
-          lcd_goto_screen(_lcd_ubl_output_map_lcd);
1575
-        #endif
1576
-      }
1570
+      if (ubl_lcd_map_control)
1571
+        lcd_goto_screen(_lcd_ubl_output_map_lcd);
1577 1572
       else lcd_return_to_status();
1578 1573
     }
1579 1574
 

+ 12
- 2
Marlin/ultralcd.cpp Zobrazit soubor

@@ -547,6 +547,15 @@ uint16_t max_display_update_time = 0;
547 547
 
548 548
 void lcd_status_screen() {
549 549
 
550
+  #if DISABLED(DOGLCD) && ENABLED(AUTO_BED_LEVELING_UBL)
551
+    if(!ubl_lcd_map_control)
552
+      lcd_set_custom_characters(
553
+       #if ENABLED(LCD_PROGRESS_BAR)
554
+        const bool info_screen_charset = true
555
+       #endif
556
+      );
557
+  #endif
558
+
550 559
   #if ENABLED(ULTIPANEL)
551 560
     ENCODER_DIRECTION_NORMAL();
552 561
     ENCODER_RATE_MULTIPLY(false);
@@ -2158,8 +2167,6 @@ void kill_screen(const char* lcd_msg) {
2158 2167
     void _lcd_ubl_map_lcd_edit_cmd() {
2159 2168
       char ubl_lcd_gcode [50], str[10], str2[10];
2160 2169
 
2161
-      ubl_lcd_map_control = true; // Used for returning to the map screen
2162
-
2163 2170
       dtostrf(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]), 0, 2, str);
2164 2171
       dtostrf(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]), 0, 2, str2);
2165 2172
       snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, n_edit_pts);
@@ -2253,6 +2260,7 @@ void kill_screen(const char* lcd_msg) {
2253 2260
      * UBL Homing before LCD map
2254 2261
      */
2255 2262
     void _lcd_ubl_output_map_lcd_cmd() {
2263
+      ubl_lcd_map_control = true; // Used for returning to the map screen
2256 2264
       if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]))
2257 2265
         enqueue_and_echo_commands_P(PSTR("G28"));
2258 2266
       lcd_goto_screen(_lcd_ubl_map_homing);
@@ -2393,6 +2401,8 @@ void kill_screen(const char* lcd_msg) {
2393 2401
         if (!g29_in_progress)
2394 2402
       #endif
2395 2403
       MENU_ITEM(submenu, MSG_BED_LEVELING, lcd_bed_leveling);
2404
+    #elif PLANNER_LEVELING
2405
+      MENU_ITEM(gcode, MSG_BED_LEVELING, PSTR("G28\nG29"));
2396 2406
     #endif
2397 2407
 
2398 2408
     #if HAS_M206_COMMAND

Loading…
Zrušit
Uložit