Replace 'const float &' with 'const_float_t' (#21505)

This commit is contained in:
Scott Lahteine
2021-04-01 17:59:57 -05:00
committed by GitHub
parent 600ef1e47c
commit 62f37669dc
79 changed files with 376 additions and 366 deletions

View File

@@ -672,7 +672,7 @@ void unified_bed_leveling::G29() {
* G29 P5 C<value> : Adjust Mesh To Mean (and subtract the given offset).
* Find the mean average and shift the mesh to center on that value.
*/
void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const float offset) {
void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const_float_t offset) {
float sum = 0;
int n = 0;
GRID_LOOP(x, y)
@@ -821,7 +821,7 @@ void set_message_with_feedback(PGM_P const msg_P) {
return false;
}
void unified_bed_leveling::move_z_with_encoder(const float &multiplier) {
void unified_bed_leveling::move_z_with_encoder(const_float_t multiplier) {
ui.wait_for_release();
while (!ui.button_pressed()) {
idle();
@@ -883,7 +883,7 @@ void set_message_with_feedback(PGM_P const msg_P) {
* Move to INVALID points and
* NOTE: Blocks the G-code queue and captures Marlin UI during use.
*/
void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const float &z_clearance, const float &thick, const bool do_ubl_mesh_map) {
void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const_float_t z_clearance, const_float_t thick, const bool do_ubl_mesh_map) {
ui.capture();
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
@@ -1633,10 +1633,10 @@ void unified_bed_leveling::smart_fill_mesh() {
*/
#ifdef VALIDATE_MESH_TILT
auto d_from = []{ DEBUG_ECHOPGM("D from "); };
auto normed = [&](const xy_pos_t &pos, const float &zadd) {
auto normed = [&](const xy_pos_t &pos, const_float_t zadd) {
return normal.x * pos.x + normal.y * pos.y + zadd;
};
auto debug_pt = [](PGM_P const pre, const xy_pos_t &pos, const float &zadd) {
auto debug_pt = [](PGM_P const pre, const xy_pos_t &pos, const_float_t zadd) {
d_from(); SERIAL_ECHOPGM_P(pre);
DEBUG_ECHO_F(normed(pos, zadd), 6);
DEBUG_ECHOLNPAIR_F(" Z error = ", zadd - get_z_correction(pos), 6);
@@ -1658,7 +1658,7 @@ void unified_bed_leveling::smart_fill_mesh() {
#endif // HAS_BED_PROBE
#if ENABLED(UBL_G29_P31)
void unified_bed_leveling::smart_fill_wlsf(const float &weight_factor) {
void unified_bed_leveling::smart_fill_wlsf(const_float_t weight_factor) {
// For each undefined mesh point, compute a distance-weighted least squares fit
// from all the originally populated mesh points, weighted toward the point