|
@@ -713,7 +713,7 @@
|
713
|
713
|
* Probe all invalidated locations of the mesh that can be reached by the probe.
|
714
|
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
|
717
|
mesh_index_pair location;
|
718
|
718
|
|
719
|
719
|
#if ENABLED(NEWPANEL)
|
|
@@ -723,7 +723,7 @@
|
723
|
723
|
save_ubl_active_state_and_disable(); // we don't do bed level correction because we want the raw data when we probe
|
724
|
724
|
DEPLOY_PROBE();
|
725
|
725
|
|
726
|
|
- uint16_t max_iterations = GRID_MAX_POINTS;
|
|
726
|
+ uint16_t count = GRID_MAX_POINTS;
|
727
|
727
|
|
728
|
728
|
do {
|
729
|
729
|
if (do_ubl_mesh_map) display_map(g29_map_type);
|
|
@@ -742,7 +742,7 @@
|
742
|
742
|
}
|
743
|
743
|
#endif
|
744
|
744
|
|
745
|
|
- if (close_or_far)
|
|
745
|
+ if (do_furthest)
|
746
|
746
|
location = find_furthest_invalid_mesh_point();
|
747
|
747
|
else
|
748
|
748
|
location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, NULL);
|
|
@@ -755,7 +755,7 @@
|
755
|
755
|
z_values[location.x_index][location.y_index] = measured_z;
|
756
|
756
|
}
|
757
|
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
|
760
|
STOW_PROBE();
|
761
|
761
|
restore_ubl_active_state_and_leave();
|