|
@ -544,7 +544,7 @@ |
|
|
#endif |
|
|
#endif |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 5: adjust_mesh_to_mean(g29_constant); break; |
|
|
case 5: adjust_mesh_to_mean(g29_c_flag, g29_constant); break; |
|
|
|
|
|
|
|
|
case 6: shift_mesh_height(); break; |
|
|
case 6: shift_mesh_height(); break; |
|
|
} |
|
|
} |
|
@ -634,7 +634,7 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void unified_bed_leveling::adjust_mesh_to_mean(const float value) { |
|
|
void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const float value) { |
|
|
float sum = 0.0; |
|
|
float sum = 0.0; |
|
|
int n = 0; |
|
|
int n = 0; |
|
|
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) |
|
|
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) |
|
@ -665,7 +665,7 @@ |
|
|
SERIAL_ECHO_F(sigma, 6); |
|
|
SERIAL_ECHO_F(sigma, 6); |
|
|
SERIAL_EOL(); |
|
|
SERIAL_EOL(); |
|
|
|
|
|
|
|
|
if (g29_c_flag) |
|
|
if (cflag) |
|
|
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) |
|
|
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) |
|
|
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) |
|
|
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) |
|
|
if (!isnan(z_values[x][y])) |
|
|
if (!isnan(z_values[x][y])) |
|
@ -1081,7 +1081,7 @@ |
|
|
SERIAL_EOL(); |
|
|
SERIAL_EOL(); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
adjust_mesh_to_mean(g29_constant); |
|
|
adjust_mesh_to_mean(g29_c_flag, g29_constant); |
|
|
|
|
|
|
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
SERIAL_PROTOCOLPGM("zprobe_zoffset: "); |
|
|
SERIAL_PROTOCOLPGM("zprobe_zoffset: "); |
|
|