Replace 'const float &' with 'const_float_t' (#21505)
This commit is contained in:
@ -212,7 +212,7 @@ mesh_index_pair find_closest_circle_to_print(const xy_pos_t &pos) {
|
||||
return out_point;
|
||||
}
|
||||
|
||||
void move_to(const float &rx, const float &ry, const float &z, const float &e_delta) {
|
||||
void move_to(const_float_t rx, const_float_t ry, const_float_t z, const_float_t e_delta) {
|
||||
static float last_z = -999.99;
|
||||
|
||||
const xy_pos_t dest = { rx, ry };
|
||||
@ -239,7 +239,7 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de
|
||||
prepare_internal_move_to_destination(fr_mm_s);
|
||||
}
|
||||
|
||||
FORCE_INLINE void move_to(const xyz_pos_t &where, const float &de) { move_to(where.x, where.y, where.z, de); }
|
||||
FORCE_INLINE void move_to(const xyz_pos_t &where, const_float_t de) { move_to(where.x, where.y, where.z, de); }
|
||||
|
||||
void retract_filament(const xyz_pos_t &where) {
|
||||
if (!g26_retracted) { // Only retract if we are not already retracted!
|
||||
|
@ -93,7 +93,7 @@ void ac_cleanup(TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index)) {
|
||||
TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, true));
|
||||
}
|
||||
|
||||
void print_signed_float(PGM_P const prefix, const float &f) {
|
||||
void print_signed_float(PGM_P const prefix, const_float_t f) {
|
||||
SERIAL_ECHOPGM(" ");
|
||||
SERIAL_ECHOPGM_P(prefix);
|
||||
SERIAL_CHAR(':');
|
||||
|
@ -312,7 +312,7 @@ void GcodeSuite::G34() {
|
||||
ui.set_status(msg);
|
||||
#endif
|
||||
|
||||
auto decreasing_accuracy = [](const float &v1, const float &v2){
|
||||
auto decreasing_accuracy = [](const_float_t v1, const_float_t v2){
|
||||
if (v1 < v2 * 0.7f) {
|
||||
SERIAL_ECHOLNPGM("Decreasing Accuracy Detected.");
|
||||
LCD_MESSAGEPGM(MSG_DECREASING_ACCURACY);
|
||||
|
@ -117,7 +117,7 @@ void GcodeSuite::M48() {
|
||||
max = -99999.9, // Largest value sampled so far
|
||||
sample_set[n_samples]; // Storage for sampled values
|
||||
|
||||
auto dev_report = [](const bool verbose, const float &mean, const float &sigma, const float &min, const float &max, const bool final=false) {
|
||||
auto dev_report = [](const bool verbose, const_float_t mean, const_float_t sigma, const_float_t min, const_float_t max, const bool final=false) {
|
||||
if (verbose) {
|
||||
SERIAL_ECHOPAIR_F("Mean: ", mean, 6);
|
||||
if (!final) SERIAL_ECHOPAIR_F(" Sigma: ", sigma, 6);
|
||||
|
@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef PHOTO_RETRACT_MM
|
||||
inline void e_move_m240(const float length, const feedRate_t &fr_mm_s) {
|
||||
inline void e_move_m240(const float length, const_feedRate_t fr_mm_s) {
|
||||
if (length && thermalManager.hotEnoughToExtrude(active_extruder))
|
||||
unscaled_e_move(length, fr_mm_s);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ inline void echo_mix() {
|
||||
SERIAL_ECHOPAIR(" (", mixer.mix[0], "%|", mixer.mix[1], "%)");
|
||||
}
|
||||
|
||||
inline void echo_zt(const int t, const float &z) {
|
||||
inline void echo_zt(const int t, const_float_t z) {
|
||||
mixer.update_mix_from_vtool(t);
|
||||
SERIAL_ECHOPAIR_P(SP_Z_STR, z, SP_T_STR, t);
|
||||
echo_mix();
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
|
||||
FORCE_INLINE void mod_probe_offset(const float &offs) {
|
||||
FORCE_INLINE void mod_probe_offset(const_float_t offs) {
|
||||
if (TERN1(BABYSTEP_HOTEND_Z_OFFSET, active_extruder == 0)) {
|
||||
probe.offset.z += offs;
|
||||
SERIAL_ECHO_MSG(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
|
||||
|
@ -282,8 +282,8 @@ public:
|
||||
// Units modes: Inches, Fahrenheit, Kelvin
|
||||
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
static inline float mm_to_linear_unit(const float mm) { return mm / linear_unit_factor; }
|
||||
static inline float mm_to_volumetric_unit(const float mm) { return mm / (volumetric_enabled ? volumetric_unit_factor : linear_unit_factor); }
|
||||
static inline float mm_to_linear_unit(const_float_t mm) { return mm / linear_unit_factor; }
|
||||
static inline float mm_to_volumetric_unit(const_float_t mm) { return mm / (volumetric_enabled ? volumetric_unit_factor : linear_unit_factor); }
|
||||
|
||||
// Init linear units by constructor
|
||||
GCodeParser() { set_input_linear_units(LINEARUNIT_MM); }
|
||||
@ -301,16 +301,16 @@ public:
|
||||
return (axis >= E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor);
|
||||
}
|
||||
|
||||
static inline float linear_value_to_mm(const float v) { return v * linear_unit_factor; }
|
||||
static inline float linear_value_to_mm(const_float_t v) { return v * linear_unit_factor; }
|
||||
static inline float axis_value_to_mm(const AxisEnum axis, const float v) { return v * axis_unit_factor(axis); }
|
||||
static inline float per_axis_value(const AxisEnum axis, const float v) { return v / axis_unit_factor(axis); }
|
||||
|
||||
#else
|
||||
|
||||
static inline float mm_to_linear_unit(const float mm) { return mm; }
|
||||
static inline float mm_to_volumetric_unit(const float mm) { return mm; }
|
||||
static inline float mm_to_linear_unit(const_float_t mm) { return mm; }
|
||||
static inline float mm_to_volumetric_unit(const_float_t mm) { return mm; }
|
||||
|
||||
static inline float linear_value_to_mm(const float v) { return v; }
|
||||
static inline float linear_value_to_mm(const_float_t v) { return v; }
|
||||
static inline float axis_value_to_mm(const AxisEnum, const float v) { return v; }
|
||||
static inline float per_axis_value(const AxisEnum, const float v) { return v; }
|
||||
|
||||
|
Reference in New Issue
Block a user