Merge pull request #7428 from thinkyhead/bf1_cleanup_aug_3
Clean up whitespace, trailing space, bad tab conversion, etc.
This commit is contained in:
commit
50bfcf4c3e
10
Marlin/ubl.h
10
Marlin/ubl.h
|
@ -385,17 +385,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FORCE_INLINE static float mesh_index_to_xpos(const uint8_t i) {
|
FORCE_INLINE static float mesh_index_to_xpos(const uint8_t i) {
|
||||||
if (i<GRID_MAX_POINTS_X)
|
return i < GRID_MAX_POINTS_X ? pgm_read_float(&_mesh_index_to_xpos[i]) : UBL_MESH_MIN_X + i * (MESH_X_DIST);
|
||||||
return pgm_read_float(&_mesh_index_to_xpos[i]);
|
|
||||||
else
|
|
||||||
return UBL_MESH_MIN_X + i * (MESH_X_DIST);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCE_INLINE static float mesh_index_to_ypos(const uint8_t i) {
|
FORCE_INLINE static float mesh_index_to_ypos(const uint8_t i) {
|
||||||
if (i<GRID_MAX_POINTS_Y)
|
return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : UBL_MESH_MIN_Y + i * (MESH_Y_DIST);
|
||||||
return pgm_read_float(&_mesh_index_to_ypos[i]);
|
|
||||||
else
|
|
||||||
return UBL_MESH_MIN_Y + i * (MESH_Y_DIST);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool prepare_segmented_line_to(const float ltarget[XYZE], const float &feedrate);
|
static bool prepare_segmented_line_to(const float ltarget[XYZE], const float &feedrate);
|
||||||
|
|
|
@ -180,22 +180,13 @@
|
||||||
z2 = z_values[cell_dest_xi ][cell_dest_yi + 1] + xratio *
|
z2 = z_values[cell_dest_xi ][cell_dest_yi + 1] + xratio *
|
||||||
(z_values[cell_dest_xi + 1][cell_dest_yi + 1] - z_values[cell_dest_xi][cell_dest_yi + 1]);
|
(z_values[cell_dest_xi + 1][cell_dest_yi + 1] - z_values[cell_dest_xi][cell_dest_yi + 1]);
|
||||||
|
|
||||||
if ( cell_dest_xi >= GRID_MAX_POINTS_X-1) {
|
if (cell_dest_xi >= GRID_MAX_POINTS_X - 1) z1 = z2 = 0.0;
|
||||||
z1 = 0.0;
|
|
||||||
z2 = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// we are done with the fractional X distance into the cell. Now with the two Z-Heights we have calculated, we
|
// we are done with the fractional X distance into the cell. Now with the two Z-Heights we have calculated, we
|
||||||
// are going to apply the Y-Distance into the cell to interpolate the final Z correction.
|
// are going to apply the Y-Distance into the cell to interpolate the final Z correction.
|
||||||
|
|
||||||
const float yratio = (RAW_Y_POSITION(end[Y_AXIS]) - mesh_index_to_ypos(cell_dest_yi)) * (1.0 / (MESH_Y_DIST));
|
const float yratio = (RAW_Y_POSITION(end[Y_AXIS]) - mesh_index_to_ypos(cell_dest_yi)) * (1.0 / (MESH_Y_DIST));
|
||||||
|
float z0 = cell_dest_yi < GRID_MAX_POINTS_Y - 1 ? z1 + (z2 - z1) * yratio * fade_scaling_factor_for_z(end[Z_AXIS]) : 0.0;
|
||||||
float z0 = z1 + (z2 - z1) * yratio;
|
|
||||||
|
|
||||||
if ( cell_dest_yi >= GRID_MAX_POINTS_Y-1)
|
|
||||||
z0 = 0.0;
|
|
||||||
|
|
||||||
z0 *= fade_scaling_factor_for_z(end[Z_AXIS]);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If part of the Mesh is undefined, it will show up as NAN
|
* If part of the Mesh is undefined, it will show up as NAN
|
||||||
|
|
Loading…
Reference in a new issue