|
@@ -727,7 +727,7 @@
|
727
|
727
|
* Probe all invalidated locations of the mesh that can be reached by the probe.
|
728
|
728
|
* This attempts to fill in locations closest to the nozzle's start location first.
|
729
|
729
|
*/
|
730
|
|
- void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
|
|
730
|
+ void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &nearby, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
|
731
|
731
|
probe.deploy(); // Deploy before ui.capture() to allow for PAUSE_BEFORE_DEPLOY_STOW
|
732
|
732
|
|
733
|
733
|
TERN_(HAS_LCD_MENU, ui.capture());
|
|
@@ -758,7 +758,7 @@
|
758
|
758
|
|
759
|
759
|
best = do_furthest
|
760
|
760
|
? find_furthest_invalid_mesh_point()
|
761
|
|
- : find_closest_mesh_point_of_type(INVALID, pos, true);
|
|
761
|
+ : find_closest_mesh_point_of_type(INVALID, nearby, true);
|
762
|
762
|
|
763
|
763
|
if (best.pos.x >= 0) { // mesh point found and is reachable by probe
|
764
|
764
|
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::PROBE_START));
|
|
@@ -788,8 +788,8 @@
|
788
|
788
|
restore_ubl_active_state_and_leave();
|
789
|
789
|
|
790
|
790
|
do_blocking_move_to_xy(
|
791
|
|
- constrain(pos.x - probe.offset_xy.x, MESH_MIN_X, MESH_MAX_X),
|
792
|
|
- constrain(pos.y - probe.offset_xy.y, MESH_MIN_Y, MESH_MAX_Y)
|
|
791
|
+ constrain(nearby.x - probe.offset_xy.x, MESH_MIN_X, MESH_MAX_X),
|
|
792
|
+ constrain(nearby.y - probe.offset_xy.y, MESH_MIN_Y, MESH_MAX_Y)
|
793
|
793
|
);
|
794
|
794
|
}
|
795
|
795
|
|
|
@@ -1206,7 +1206,7 @@
|
1206
|
1206
|
|
1207
|
1207
|
found_a_NAN = true;
|
1208
|
1208
|
|
1209
|
|
- xy_int8_t near_pos { -1, -1 };
|
|
1209
|
+ xy_int8_t nearby { -1, -1 };
|
1210
|
1210
|
float d1, d2 = 99999.9f;
|
1211
|
1211
|
GRID_LOOP(k, l) {
|
1212
|
1212
|
if (isnan(z_values[k][l])) continue;
|
|
@@ -1221,7 +1221,7 @@
|
1221
|
1221
|
|
1222
|
1222
|
if (d1 < d2) { // Invalid mesh point (i,j) is closer to the defined point (k,l)
|
1223
|
1223
|
d2 = d1;
|
1224
|
|
- near_pos.set(i, j);
|
|
1224
|
+ nearby.set(i, j);
|
1225
|
1225
|
}
|
1226
|
1226
|
}
|
1227
|
1227
|
|
|
@@ -1229,8 +1229,8 @@
|
1229
|
1229
|
// At this point d2 should have the near defined mesh point to invalid mesh point (i,j)
|
1230
|
1230
|
//
|
1231
|
1231
|
|
1232
|
|
- if (found_a_real && near_pos.x >= 0 && d2 > farthest.distance) {
|
1233
|
|
- farthest.pos = near_pos; // Found an invalid location farther from the defined mesh point
|
|
1232
|
+ if (found_a_real && nearby.x >= 0 && d2 > farthest.distance) {
|
|
1233
|
+ farthest.pos = nearby; // Found an invalid location farther from the defined mesh point
|
1234
|
1234
|
farthest.distance = d2;
|
1235
|
1235
|
}
|
1236
|
1236
|
} // GRID_LOOP
|