瀏覽代碼

ubl G29 tweaks

Scott Lahteine 7 年之前
父節點
當前提交
24b9c1923f
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl.h
  2. 4
    4
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.h 查看文件

91
     static bool g29_parameter_parsing() _O0;
91
     static bool g29_parameter_parsing() _O0;
92
     static void find_mean_mesh_height();
92
     static void find_mean_mesh_height();
93
     static void shift_mesh_height();
93
     static void shift_mesh_height();
94
-    static void probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest) _O0;
94
+    static void probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) _O0;
95
     static void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3);
95
     static void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3);
96
     static void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map);
96
     static void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map);
97
     static void g29_what_command();
97
     static void g29_what_command();

+ 4
- 4
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

713
      * Probe all invalidated locations of the mesh that can be reached by the probe.
713
      * Probe all invalidated locations of the mesh that can be reached by the probe.
714
      * This attempts to fill in locations closest to the nozzle's start location first.
714
      * This attempts to fill in locations closest to the nozzle's start location first.
715
      */
715
      */
716
-    void unified_bed_leveling::probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, bool close_or_far) {
716
+    void unified_bed_leveling::probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
717
       mesh_index_pair location;
717
       mesh_index_pair location;
718
 
718
 
719
       #if ENABLED(NEWPANEL)
719
       #if ENABLED(NEWPANEL)
723
       save_ubl_active_state_and_disable();   // we don't do bed level correction because we want the raw data when we probe
723
       save_ubl_active_state_and_disable();   // we don't do bed level correction because we want the raw data when we probe
724
       DEPLOY_PROBE();
724
       DEPLOY_PROBE();
725
 
725
 
726
-      uint16_t max_iterations = GRID_MAX_POINTS;
726
+      uint16_t count = GRID_MAX_POINTS;
727
 
727
 
728
       do {
728
       do {
729
         if (do_ubl_mesh_map) display_map(g29_map_type);
729
         if (do_ubl_mesh_map) display_map(g29_map_type);
742
           }
742
           }
743
         #endif
743
         #endif
744
 
744
 
745
-        if (close_or_far)
745
+        if (do_furthest)
746
           location = find_furthest_invalid_mesh_point();
746
           location = find_furthest_invalid_mesh_point();
747
         else
747
         else
748
           location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, NULL);
748
           location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, NULL);
755
           z_values[location.x_index][location.y_index] = measured_z;
755
           z_values[location.x_index][location.y_index] = measured_z;
756
         }
756
         }
757
         SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
757
         SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
758
-      } while (location.x_index >= 0 && --max_iterations);
758
+      } while (location.x_index >= 0 && --count);
759
 
759
 
760
       STOW_PROBE();
760
       STOW_PROBE();
761
       restore_ubl_active_state_and_leave();
761
       restore_ubl_active_state_and_leave();

Loading…
取消
儲存