Apply loop shorthand macros (#17159)
This commit is contained in:
@ -40,9 +40,9 @@
|
||||
mesh_bed_leveling::index_to_ypos[GRID_MAX_POINTS_Y];
|
||||
|
||||
mesh_bed_leveling::mesh_bed_leveling() {
|
||||
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; ++i)
|
||||
LOOP_L_N(i, GRID_MAX_POINTS_X)
|
||||
index_to_xpos[i] = MESH_MIN_X + i * (MESH_X_DIST);
|
||||
for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; ++i)
|
||||
LOOP_L_N(i, GRID_MAX_POINTS_Y)
|
||||
index_to_ypos[i] = MESH_MIN_Y + i * (MESH_Y_DIST);
|
||||
reset();
|
||||
}
|
||||
@ -51,9 +51,7 @@
|
||||
z_offset = 0;
|
||||
ZERO(z_values);
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
ExtUI::onMeshUpdate(x, y, 0);
|
||||
GRID_LOOP(x, y) ExtUI::onMeshUpdate(x, y, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,7 @@ public:
|
||||
static void reset();
|
||||
|
||||
FORCE_INLINE static bool has_mesh() {
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
if (z_values[x][y]) return true;
|
||||
GRID_LOOP(x, y) if (z_values[x][y]) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user