|
@@ -1282,7 +1282,7 @@ mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {
|
1282
|
1282
|
|
1283
|
1283
|
static bool test_func(uint8_t i, uint8_t j, void *data) {
|
1284
|
1284
|
find_closest_t *d = (find_closest_t*)data;
|
1285
|
|
- if ( (d->type == (isnan(ubl.z_values[i][j]) ? INVALID : REAL))
|
|
1285
|
+ if ( d->type == CLOSEST || d->type == (isnan(ubl.z_values[i][j]) ? INVALID : REAL)
|
1286
|
1286
|
|| (d->type == SET_IN_BITMAP && !d->done_flags->marked(i, j))
|
1287
|
1287
|
) {
|
1288
|
1288
|
// Found a Mesh Point of the specified type!
|
|
@@ -1326,7 +1326,7 @@ mesh_index_pair unified_bed_leveling::find_closest_mesh_point_of_type(const Mesh
|
1326
|
1326
|
float best_so_far = 99999.99f;
|
1327
|
1327
|
|
1328
|
1328
|
GRID_LOOP(i, j) {
|
1329
|
|
- if ( (type == (isnan(z_values[i][j]) ? INVALID : REAL))
|
|
1329
|
+ if ( type == CLOSEST || type == (isnan(z_values[i][j]) ? INVALID : REAL)
|
1330
|
1330
|
|| (type == SET_IN_BITMAP && !done_flags->marked(i, j))
|
1331
|
1331
|
) {
|
1332
|
1332
|
// Found a Mesh Point of the specified type!
|