Переглянути джерело

Merge pull request #3979 from thinkyhead/mbl_cell

MBL: cel => cell
Scott Lahteine 9 роки тому
джерело
коміт
3d56b9d127
2 змінених файлів з 8 додано та 8 видалено
  1. 4
    4
      Marlin/Marlin_main.cpp
  2. 4
    4
      Marlin/mesh_bed_leveling.h

+ 4
- 4
Marlin/Marlin_main.cpp Переглянути файл

7386
     set_current_to_destination();
7386
     set_current_to_destination();
7387
     return;
7387
     return;
7388
   }
7388
   }
7389
-  int pcx = mbl.cel_index_x(current_position[X_AXIS] - home_offset[X_AXIS]);
7390
-  int pcy = mbl.cel_index_y(current_position[Y_AXIS] - home_offset[Y_AXIS]);
7391
-  int cx = mbl.cel_index_x(x - home_offset[X_AXIS]);
7392
-  int cy = mbl.cel_index_y(y - home_offset[Y_AXIS]);
7389
+  int pcx = mbl.cell_index_x(current_position[X_AXIS] - home_offset[X_AXIS]);
7390
+  int pcy = mbl.cell_index_y(current_position[Y_AXIS] - home_offset[Y_AXIS]);
7391
+  int cx = mbl.cell_index_x(x - home_offset[X_AXIS]);
7392
+  int cy = mbl.cell_index_y(y - home_offset[Y_AXIS]);
7393
   NOMORE(pcx, MESH_NUM_X_POINTS - 2);
7393
   NOMORE(pcx, MESH_NUM_X_POINTS - 2);
7394
   NOMORE(pcy, MESH_NUM_Y_POINTS - 2);
7394
   NOMORE(pcy, MESH_NUM_Y_POINTS - 2);
7395
   NOMORE(cx,  MESH_NUM_X_POINTS - 2);
7395
   NOMORE(cx,  MESH_NUM_X_POINTS - 2);

+ 4
- 4
Marlin/mesh_bed_leveling.h Переглянути файл

60
       set_z(px, py, z);
60
       set_z(px, py, z);
61
     }
61
     }
62
 
62
 
63
-    int8_t cel_index_x(float x) {
63
+    int8_t cell_index_x(float x) {
64
       int8_t cx = int(x - (MESH_MIN_X)) / (MESH_X_DIST);
64
       int8_t cx = int(x - (MESH_MIN_X)) / (MESH_X_DIST);
65
       return constrain(cx, 0, (MESH_NUM_X_POINTS) - 2);
65
       return constrain(cx, 0, (MESH_NUM_X_POINTS) - 2);
66
     }
66
     }
67
 
67
 
68
-    int8_t cel_index_y(float y) {
68
+    int8_t cell_index_y(float y) {
69
       int8_t cy = int(y - (MESH_MIN_Y)) / (MESH_Y_DIST);
69
       int8_t cy = int(y - (MESH_MIN_Y)) / (MESH_Y_DIST);
70
       return constrain(cy, 0, (MESH_NUM_Y_POINTS) - 2);
70
       return constrain(cy, 0, (MESH_NUM_Y_POINTS) - 2);
71
     }
71
     }
87
     }
87
     }
88
 
88
 
89
     float get_z(float x0, float y0) {
89
     float get_z(float x0, float y0) {
90
-      int8_t cx = cel_index_x(x0),
91
-             cy = cel_index_y(y0);
90
+      int8_t cx = cell_index_x(x0),
91
+             cy = cell_index_y(y0);
92
       if (cx < 0 || cy < 0) return z_offset;
92
       if (cx < 0 || cy < 0) return z_offset;
93
       float z1 = calc_z0(x0,
93
       float z1 = calc_z0(x0,
94
                          get_probe_x(cx), z_values[cy][cx],
94
                          get_probe_x(cx), z_values[cy][cx],

Завантаження…
Відмінити
Зберегти