Browse Source

Fix UI compile error in UBL (#15981)

InsanityAutomation 5 years ago
parent
commit
2142beb2e5
2 changed files with 21 additions and 10 deletions
  1. 18
    8
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  2. 3
    2
      Marlin/src/gcode/bedlevel/G26.cpp

+ 18
- 8
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

790
 
790
 
791
       } while (best.pos.x >= 0 && --count);
791
       } while (best.pos.x >= 0 && --count);
792
 
792
 
793
-      ui.release();
793
+      #if HAS_LCD_MENU
794
+        ui.release();
795
+      #endif
794
       STOW_PROBE(); // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW
796
       STOW_PROBE(); // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW
795
-      ui.capture();
797
+      #if HAS_LCD_MENU
798
+        ui.capture();
799
+      #endif
796
 
800
 
797
       #ifdef Z_AFTER_PROBING
801
       #ifdef Z_AFTER_PROBING
798
         move_z_after_probing();
802
         move_z_after_probing();
851
     static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
855
     static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
852
 
856
 
853
     float unified_bed_leveling::measure_business_card_thickness(float in_height) {
857
     float unified_bed_leveling::measure_business_card_thickness(float in_height) {
854
-      ui.capture();
858
+      #if HAS_LCD_MENU
859
+        ui.capture();
860
+      #endif
855
       save_ubl_active_state_and_disable();   // Disable bed level correction for probing
861
       save_ubl_active_state_and_disable();   // Disable bed level correction for probing
856
 
862
 
857
       do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
863
       do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
890
     }
896
     }
891
 
897
 
892
     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) {
898
     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) {
893
-
894
-      ui.capture();
899
+      #if HAS_LCD_MENU
900
+        ui.capture();
901
+      #endif
895
 
902
 
896
       save_ubl_active_state_and_disable();  // No bed level correction so only raw data is obtained
903
       save_ubl_active_state_and_disable();  // No bed level correction so only raw data is obtained
897
       do_blocking_move_to_xy_z(current_position, z_clearance);
904
       do_blocking_move_to_xy_z(current_position, z_clearance);
919
         do_blocking_move_to_z(z_clearance);
926
         do_blocking_move_to_z(z_clearance);
920
 
927
 
921
         KEEPALIVE_STATE(PAUSED_FOR_USER);
928
         KEEPALIVE_STATE(PAUSED_FOR_USER);
922
-        ui.capture();
929
+        #if HAS_LCD_MENU
930
+          ui.capture();
931
+        #endif
923
 
932
 
924
         if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
933
         if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
925
 
934
 
986
       save_ubl_active_state_and_disable();
995
       save_ubl_active_state_and_disable();
987
 
996
 
988
       LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
997
       LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
989
-      ui.capture();                                         // Take over control of the LCD encoder
990
-
998
+      #if HAS_LCD_MENU
999
+        ui.capture();                                         // Take over control of the LCD encoder
1000
+      #endif
991
       do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
1001
       do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
992
 
1002
 
993
       #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
1003
       #if ENABLED(UBL_MESH_EDIT_MOVES_Z)

+ 3
- 2
Marlin/src/gcode/bedlevel/G26.cpp View File

424
     #endif
424
     #endif
425
 
425
 
426
     if (g26_prime_flag == -1) {  // The user wants to control how much filament gets purged
426
     if (g26_prime_flag == -1) {  // The user wants to control how much filament gets purged
427
-
428
-      ui.capture();
427
+      #if HAS_LCD_MENU
428
+        ui.capture();
429
+      #endif
429
       ui.set_status_P(GET_TEXT(MSG_G26_MANUAL_PRIME), 99);
430
       ui.set_status_P(GET_TEXT(MSG_G26_MANUAL_PRIME), 99);
430
       ui.chirp();
431
       ui.chirp();
431
 
432
 

Loading…
Cancel
Save