Explorar el Código

Don’t use near keyword as variable name (#20374)

Tanguy Pruvot hace 4 años
padre
commit
0a03ef4b6f
No account linked to committer's email address
Se han modificado 1 ficheros con 8 adiciones y 8 borrados
  1. 8
    8
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+ 8
- 8
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Ver fichero

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

Loading…
Cancelar
Guardar