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

@ -669,7 +669,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
B00001100,B00000000
};
void _lcd_zoffset_overlay_gfx(const float zvalue) {
void _lcd_zoffset_overlay_gfx(const_float_t zvalue) {
// Determine whether the user is raising or lowering the nozzle.
static int8_t dir;
static float old_zvalue;

View File

@ -101,7 +101,7 @@ namespace ExtUI {
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval) {
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
//SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval);
}

View File

@ -93,7 +93,7 @@ namespace ExtUI {
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval) {
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
}
#endif

View File

@ -111,7 +111,7 @@ namespace ExtUI {
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval) {
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
}

View File

@ -97,7 +97,7 @@ namespace ExtUI {
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval) {
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
}

View File

@ -140,7 +140,7 @@ namespace ExtUI {
#if HAS_LEVELING && HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t x, const int8_t y, const float &val) {
void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) {
BedMeshScreen::onMeshUpdate(x, y, val);
}

View File

@ -528,7 +528,7 @@ namespace ExtUI {
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval) {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {}
#endif

View File

@ -325,7 +325,7 @@ namespace ExtUI {
return epos;
}
void setAxisPosition_mm(const float &position, const axis_t axis, const feedRate_t feedrate/*=0*/) {
void setAxisPosition_mm(const_float_t position, const axis_t axis, const feedRate_t feedrate/*=0*/) {
// Get motion limit from software endstops, if any
float min, max;
soft_endstop.get_manual_axis_limits((AxisEnum)axis, min, max);
@ -343,7 +343,7 @@ namespace ExtUI {
line_to_current_position(feedrate ?: manual_feedrate_mm_s[axis]);
}
void setAxisPosition_mm(const float &position, const extruder_t extruder, const feedRate_t feedrate/*=0*/) {
void setAxisPosition_mm(const_float_t position, const extruder_t extruder, const feedRate_t feedrate/*=0*/) {
setActiveTool(extruder, true);
current_position.e = position;
@ -455,7 +455,7 @@ namespace ExtUI {
};
}
void setAxisCurrent_mA(const float &mA, const axis_t axis) {
void setAxisCurrent_mA(const_float_t mA, const axis_t axis) {
switch (axis) {
#if AXIS_IS_TMC(X)
case X: stepperX.rms_current(constrain(mA, 400, 1500)); break;
@ -479,7 +479,7 @@ namespace ExtUI {
};
}
void setAxisCurrent_mA(const float &mA, const extruder_t extruder) {
void setAxisCurrent_mA(const_float_t mA, const extruder_t extruder) {
switch (extruder) {
#if AXIS_IS_TMC(E0)
case E0: stepperE0.rms_current(constrain(mA, 400, 1500)); break;
@ -539,7 +539,7 @@ namespace ExtUI {
}
}
void setTMCBumpSensitivity(const float &value, const axis_t axis) {
void setTMCBumpSensitivity(const_float_t value, const axis_t axis) {
switch (axis) {
#if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
#if X_SENSORLESS
@ -583,12 +583,12 @@ namespace ExtUI {
return planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)];
}
void setAxisSteps_per_mm(const float &value, const axis_t axis) {
void setAxisSteps_per_mm(const_float_t value, const axis_t axis) {
planner.settings.axis_steps_per_mm[axis] = value;
planner.refresh_positioning();
}
void setAxisSteps_per_mm(const float &value, const extruder_t extruder) {
void setAxisSteps_per_mm(const_float_t value, const extruder_t extruder) {
UNUSED_E(extruder);
planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)] = value;
planner.refresh_positioning();
@ -621,11 +621,11 @@ namespace ExtUI {
return planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(extruder - E0)];
}
void setAxisMaxAcceleration_mm_s2(const float &value, const axis_t axis) {
void setAxisMaxAcceleration_mm_s2(const_float_t value, const axis_t axis) {
planner.set_max_acceleration(axis, value);
}
void setAxisMaxAcceleration_mm_s2(const float &value, const extruder_t extruder) {
void setAxisMaxAcceleration_mm_s2(const_float_t value, const extruder_t extruder) {
UNUSED_E(extruder);
planner.set_max_acceleration(E_AXIS_N(extruder - E0), value);
}
@ -638,7 +638,7 @@ namespace ExtUI {
#if HAS_FILAMENT_RUNOUT_DISTANCE
float getFilamentRunoutDistance_mm() { return runout.runout_distance(); }
void setFilamentRunoutDistance_mm(const float &value) { runout.set_runout_distance(constrain(value, 0, 999)); }
void setFilamentRunoutDistance_mm(const_float_t value) { runout.set_runout_distance(constrain(value, 0, 999)); }
#endif
#endif
@ -651,7 +651,7 @@ namespace ExtUI {
#if CASELIGHT_USES_BRIGHTNESS
float getCaseLightBrightness_percent() { return ui8_to_percent(caselight.brightness); }
void setCaseLightBrightness_percent(const float &value) {
void setCaseLightBrightness_percent(const_float_t value) {
caselight.brightness = map(constrain(value, 0, 100), 0, 100, 0, 255);
caselight.update_brightness();
}
@ -663,7 +663,7 @@ namespace ExtUI {
return (extruder < EXTRUDERS) ? planner.extruder_advance_K[extruder - E0] : 0;
}
void setLinearAdvance_mm_mm_s(const float &value, const extruder_t extruder) {
void setLinearAdvance_mm_mm_s(const_float_t value, const extruder_t extruder) {
if (extruder < EXTRUDERS)
planner.extruder_advance_K[extruder - E0] = constrain(value, 0, 10);
}
@ -675,7 +675,7 @@ namespace ExtUI {
return planner.junction_deviation_mm;
}
void setJunctionDeviation_mm(const float &value) {
void setJunctionDeviation_mm(const_float_t value) {
planner.junction_deviation_mm = constrain(value, 0.001, 0.3);
TERN_(LIN_ADVANCE, planner.recalculate_max_e_jerk());
}
@ -683,8 +683,8 @@ namespace ExtUI {
#else
float getAxisMaxJerk_mm_s(const axis_t axis) { return planner.max_jerk[axis]; }
float getAxisMaxJerk_mm_s(const extruder_t) { return planner.max_jerk.e; }
void setAxisMaxJerk_mm_s(const float &value, const axis_t axis) { planner.set_max_jerk((AxisEnum)axis, value); }
void setAxisMaxJerk_mm_s(const float &value, const extruder_t) { planner.set_max_jerk(E_AXIS, value); }
void setAxisMaxJerk_mm_s(const_float_t value, const axis_t axis) { planner.set_max_jerk((AxisEnum)axis, value); }
void setAxisMaxJerk_mm_s(const_float_t value, const extruder_t) { planner.set_max_jerk(E_AXIS, value); }
#endif
#if ENABLED(DUAL_X_CARRIAGE)
@ -709,9 +709,9 @@ namespace ExtUI {
void setFlow_percent(const int16_t flow, const extruder_t extr) { planner.set_flow(extr, flow); }
void setMinFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_feedrate_mm_s = fr; }
void setMinTravelFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_travel_feedrate_mm_s = fr; }
void setPrintingAcceleration_mm_s2(const float &acc) { planner.settings.acceleration = acc; }
void setRetractAcceleration_mm_s2(const float &acc) { planner.settings.retract_acceleration = acc; }
void setTravelAcceleration_mm_s2(const float &acc) { planner.settings.travel_acceleration = acc; }
void setPrintingAcceleration_mm_s2(const_float_t acc) { planner.settings.acceleration = acc; }
void setRetractAcceleration_mm_s2(const_float_t acc) { planner.settings.retract_acceleration = acc; }
void setTravelAcceleration_mm_s2(const_float_t acc) { planner.settings.travel_acceleration = acc; }
#if ENABLED(BABYSTEPPING)
@ -772,7 +772,7 @@ namespace ExtUI {
* Converts a mm displacement to a number of whole number of
* steps that is at least mm long.
*/
int16_t mmToWholeSteps(const float &mm, const axis_t axis) {
int16_t mmToWholeSteps(const_float_t mm, const axis_t axis) {
const float steps = mm / planner.steps_to_mm[axis];
return steps > 0 ? CEIL(steps) : FLOOR(steps);
}
@ -789,7 +789,7 @@ namespace ExtUI {
);
}
void setZOffset_mm(const float &value) {
void setZOffset_mm(const_float_t value) {
#if HAS_BED_PROBE
if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
probe.offset.z = value;
@ -807,7 +807,7 @@ namespace ExtUI {
return hotend_offset[extruder - E0][axis];
}
void setNozzleOffset_mm(const float &value, const axis_t axis, const extruder_t extruder) {
void setNozzleOffset_mm(const_float_t value, const axis_t axis, const extruder_t extruder) {
if (extruder - E0 >= HOTENDS) return;
hotend_offset[extruder - E0][axis] = value;
}
@ -826,20 +826,20 @@ namespace ExtUI {
#if HAS_BED_PROBE
float getProbeOffset_mm(const axis_t axis) { return probe.offset.pos[axis]; }
void setProbeOffset_mm(const float &val, const axis_t axis) { probe.offset.pos[axis] = val; }
void setProbeOffset_mm(const_float_t val, const axis_t axis) { probe.offset.pos[axis] = val; }
#endif
#if ENABLED(BACKLASH_GCODE)
float getAxisBacklash_mm(const axis_t axis) { return backlash.distance_mm[axis]; }
void setAxisBacklash_mm(const float &value, const axis_t axis)
void setAxisBacklash_mm(const_float_t value, const axis_t axis)
{ backlash.distance_mm[axis] = constrain(value,0,5); }
float getBacklashCorrection_percent() { return ui8_to_percent(backlash.correction); }
void setBacklashCorrection_percent(const float &value) { backlash.correction = map(constrain(value, 0, 100), 0, 100, 0, 255); }
void setBacklashCorrection_percent(const_float_t value) { backlash.correction = map(constrain(value, 0, 100), 0, 100, 0, 255); }
#ifdef BACKLASH_SMOOTHING_MM
float getBacklashSmoothing_mm() { return backlash.smoothing_mm; }
void setBacklashSmoothing_mm(const float &value) { backlash.smoothing_mm = constrain(value, 0, 999); }
void setBacklashSmoothing_mm(const_float_t value) { backlash.smoothing_mm = constrain(value, 0, 999); }
#endif
#endif
@ -858,14 +858,14 @@ namespace ExtUI {
bed_mesh_t& getMeshArray() { return Z_VALUES_ARR; }
float getMeshPoint(const xy_uint8_t &pos) { return Z_VALUES(pos.x, pos.y); }
void setMeshPoint(const xy_uint8_t &pos, const float &zoff) {
void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) {
if (WITHIN(pos.x, 0, GRID_MAX_POINTS_X) && WITHIN(pos.y, 0, GRID_MAX_POINTS_Y)) {
Z_VALUES(pos.x, pos.y) = zoff;
TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate());
}
}
void moveToMeshPoint(const xy_uint8_t &pos, const float &z) {
void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z) {
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
const feedRate_t old_feedrate = feedrate_mm_s;
const float x_target = MESH_MIN_X + pos.x * (MESH_X_DIST),
@ -919,14 +919,14 @@ namespace ExtUI {
float getPIDValues_Ki(const extruder_t tool) { return unscalePID_i(PID_PARAM(Ki, tool)); }
float getPIDValues_Kd(const extruder_t tool) { return unscalePID_d(PID_PARAM(Kd, tool)); }
void setPIDValues(const float &p, const float &i, const float &d, extruder_t tool) {
void setPIDValues(const_float_t p, const_float_t i, const_float_t d, extruder_t tool) {
thermalManager.temp_hotend[tool].pid.Kp = p;
thermalManager.temp_hotend[tool].pid.Ki = scalePID_i(i);
thermalManager.temp_hotend[tool].pid.Kd = scalePID_d(d);
thermalManager.updatePID();
}
void startPIDTune(const float &temp, extruder_t tool) {
void startPIDTune(const_float_t temp, extruder_t tool) {
thermalManager.PID_autotune(temp, (heater_id_t)tool, 8, true);
}
#endif
@ -936,14 +936,14 @@ namespace ExtUI {
float getBedPIDValues_Ki() { return unscalePID_i(thermalManager.temp_bed.pid.Ki); }
float getBedPIDValues_Kd() { return unscalePID_d(thermalManager.temp_bed.pid.Kd); }
void setBedPIDValues(const float &p, const float &i, const float &d) {
void setBedPIDValues(const_float_t p, const_float_t i, const_float_t d) {
thermalManager.temp_bed.pid.Kp = p;
thermalManager.temp_bed.pid.Ki = scalePID_i(i);
thermalManager.temp_bed.pid.Kd = scalePID_d(d);
thermalManager.updatePID();
}
void startBedPIDTune(const float &temp) {
void startBedPIDTune(const_float_t temp) {
thermalManager.PID_autotune(temp, H_BED, 4, true);
}
#endif
@ -963,7 +963,7 @@ namespace ExtUI {
return firmware_name;
}
void setTargetTemp_celsius(const float &inval, const heater_t heater) {
void setTargetTemp_celsius(const_float_t inval, const heater_t heater) {
float value = inval;
#ifdef TOUCH_UI_LCD_TEMP_SCALING
value *= TOUCH_UI_LCD_TEMP_SCALING;
@ -988,7 +988,7 @@ namespace ExtUI {
}
}
void setTargetTemp_celsius(const float &inval, const extruder_t extruder) {
void setTargetTemp_celsius(const_float_t inval, const extruder_t extruder) {
float value = inval;
#ifdef TOUCH_UI_LCD_TEMP_SCALING
value *= TOUCH_UI_LCD_TEMP_SCALING;
@ -1000,7 +1000,7 @@ namespace ExtUI {
#endif
}
void setTargetFan_percent(const float &value, const fan_t fan) {
void setTargetFan_percent(const_float_t value, const fan_t fan) {
#if HAS_FAN
if (fan < FAN_COUNT)
thermalManager.set_fan_speed(fan - FAN0, map(constrain(value, 0, 100), 0, 100, 0, 255));
@ -1010,7 +1010,7 @@ namespace ExtUI {
#endif
}
void setFeedrate_percent(const float &value) { feedrate_percentage = constrain(value, 10, 500); }
void setFeedrate_percent(const_float_t value) { feedrate_percentage = constrain(value, 10, 500); }
void coolDown() {
#if HAS_HOTEND

View File

@ -102,11 +102,11 @@ namespace ExtUI {
#if HAS_TRINAMIC_CONFIG
float getAxisCurrent_mA(const axis_t);
float getAxisCurrent_mA(const extruder_t);
void setAxisCurrent_mA(const float&, const axis_t);
void setAxisCurrent_mA(const float&, const extruder_t);
void setAxisCurrent_mA(const_float_t , const axis_t);
void setAxisCurrent_mA(const_float_t , const extruder_t);
int getTMCBumpSensitivity(const axis_t);
void setTMCBumpSensitivity(const float&, const axis_t);
void setTMCBumpSensitivity(const_float_t , const axis_t);
#endif
float getActualTemp_celsius(const heater_t);
@ -161,11 +161,11 @@ namespace ExtUI {
#if HAS_MESH
bed_mesh_t& getMeshArray();
float getMeshPoint(const xy_uint8_t &pos);
void setMeshPoint(const xy_uint8_t &pos, const float &zval);
void moveToMeshPoint(const xy_uint8_t &pos, const float &z);
void setMeshPoint(const xy_uint8_t &pos, const_float_t zval);
void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z);
void onMeshLevelingStart();
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float &zval);
inline void onMeshUpdate(const xy_int8_t &pos, const float &zval) { onMeshUpdate(pos.x, pos.y, zval); }
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval);
inline void onMeshUpdate(const xy_int8_t &pos, const_float_t zval) { onMeshUpdate(pos.x, pos.y, zval); }
typedef enum : uint8_t {
MESH_START, // Prior to start of probe
@ -191,42 +191,42 @@ namespace ExtUI {
char* getFilamentUsed_str(char buffer[21]);
#endif
void setTargetTemp_celsius(const float&, const heater_t);
void setTargetTemp_celsius(const float&, const extruder_t);
void setTargetFan_percent(const float&, const fan_t);
void setTargetTemp_celsius(const_float_t , const heater_t);
void setTargetTemp_celsius(const_float_t , const extruder_t);
void setTargetFan_percent(const_float_t , const fan_t);
void coolDown();
void setAxisPosition_mm(const float&, const axis_t, const feedRate_t=0);
void setAxisPosition_mm(const float&, const extruder_t, const feedRate_t=0);
void setAxisSteps_per_mm(const float&, const axis_t);
void setAxisSteps_per_mm(const float&, const extruder_t);
void setAxisPosition_mm(const_float_t , const axis_t, const feedRate_t=0);
void setAxisPosition_mm(const_float_t , const extruder_t, const feedRate_t=0);
void setAxisSteps_per_mm(const_float_t , const axis_t);
void setAxisSteps_per_mm(const_float_t , const extruder_t);
void setAxisMaxFeedrate_mm_s(const feedRate_t, const axis_t);
void setAxisMaxFeedrate_mm_s(const feedRate_t, const extruder_t);
void setAxisMaxAcceleration_mm_s2(const float&, const axis_t);
void setAxisMaxAcceleration_mm_s2(const float&, const extruder_t);
void setAxisMaxAcceleration_mm_s2(const_float_t , const axis_t);
void setAxisMaxAcceleration_mm_s2(const_float_t , const extruder_t);
void setFeedrate_mm_s(const feedRate_t);
void setMinFeedrate_mm_s(const feedRate_t);
void setMinTravelFeedrate_mm_s(const feedRate_t);
void setPrintingAcceleration_mm_s2(const float&);
void setRetractAcceleration_mm_s2(const float&);
void setTravelAcceleration_mm_s2(const float&);
void setFeedrate_percent(const float&);
void setPrintingAcceleration_mm_s2(const_float_t );
void setRetractAcceleration_mm_s2(const_float_t );
void setTravelAcceleration_mm_s2(const_float_t );
void setFeedrate_percent(const_float_t );
void setFlow_percent(const int16_t, const extruder_t);
bool awaitingUserConfirm();
void setUserConfirmed();
#if ENABLED(LIN_ADVANCE)
float getLinearAdvance_mm_mm_s(const extruder_t);
void setLinearAdvance_mm_mm_s(const float&, const extruder_t);
void setLinearAdvance_mm_mm_s(const_float_t , const extruder_t);
#endif
#if HAS_JUNCTION_DEVIATION
float getJunctionDeviation_mm();
void setJunctionDeviation_mm(const float&);
void setJunctionDeviation_mm(const_float_t );
#else
float getAxisMaxJerk_mm_s(const axis_t);
float getAxisMaxJerk_mm_s(const extruder_t);
void setAxisMaxJerk_mm_s(const float&, const axis_t);
void setAxisMaxJerk_mm_s(const float&, const extruder_t);
void setAxisMaxJerk_mm_s(const_float_t , const axis_t);
void setAxisMaxJerk_mm_s(const_float_t , const extruder_t);
#endif
extruder_t getTool(const uint8_t extruder);
@ -234,7 +234,7 @@ namespace ExtUI {
void setActiveTool(const extruder_t, bool no_move);
#if ENABLED(BABYSTEPPING)
int16_t mmToWholeSteps(const float& mm, const axis_t axis);
int16_t mmToWholeSteps(const_float_t mm, const axis_t axis);
bool babystepAxis_steps(const int16_t steps, const axis_t axis);
void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles);
@ -242,28 +242,28 @@ namespace ExtUI {
#if HAS_HOTEND_OFFSET
float getNozzleOffset_mm(const axis_t, const extruder_t);
void setNozzleOffset_mm(const float&, const axis_t, const extruder_t);
void setNozzleOffset_mm(const_float_t , const axis_t, const extruder_t);
void normalizeNozzleOffset(const axis_t axis);
#endif
float getZOffset_mm();
void setZOffset_mm(const float&);
void setZOffset_mm(const_float_t );
#if HAS_BED_PROBE
float getProbeOffset_mm(const axis_t);
void setProbeOffset_mm(const float&, const axis_t);
void setProbeOffset_mm(const_float_t , const axis_t);
#endif
#if ENABLED(BACKLASH_GCODE)
float getAxisBacklash_mm(const axis_t);
void setAxisBacklash_mm(const float&, const axis_t);
void setAxisBacklash_mm(const_float_t , const axis_t);
float getBacklashCorrection_percent();
void setBacklashCorrection_percent(const float&);
void setBacklashCorrection_percent(const_float_t );
#ifdef BACKLASH_SMOOTHING_MM
float getBacklashSmoothing_mm();
void setBacklashSmoothing_mm(const float&);
void setBacklashSmoothing_mm(const_float_t );
#endif
#endif
@ -275,7 +275,7 @@ namespace ExtUI {
#if HAS_FILAMENT_RUNOUT_DISTANCE
float getFilamentRunoutDistance_mm();
void setFilamentRunoutDistance_mm(const float&);
void setFilamentRunoutDistance_mm(const_float_t );
#endif
#endif
@ -285,7 +285,7 @@ namespace ExtUI {
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
float getCaseLightBrightness_percent();
void setCaseLightBrightness_percent(const float&);
void setCaseLightBrightness_percent(const_float_t );
#endif
#endif
@ -293,16 +293,16 @@ namespace ExtUI {
float getPIDValues_Kp(const extruder_t);
float getPIDValues_Ki(const extruder_t);
float getPIDValues_Kd(const extruder_t);
void setPIDValues(const float&, const float&, const float&, extruder_t);
void startPIDTune(const float&, extruder_t);
void setPIDValues(const_float_t , const_float_t , const_float_t , extruder_t);
void startPIDTune(const_float_t , extruder_t);
#endif
#if ENABLED(PIDTEMPBED)
float getBedPIDValues_Kp();
float getBedPIDValues_Ki();
float getBedPIDValues_Kd();
void setBedPIDValues(const float&, const float&, const float&);
void startBedPIDTune(const float&);
void setBedPIDValues(const_float_t , const_float_t , const_float_t );
void startBedPIDTune(const_float_t );
#endif
/**

View File

@ -501,7 +501,7 @@ public:
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
static void ubl_mesh_edit_start(const float &initial);
static void ubl_mesh_edit_start(const_float_t initial);
static float ubl_mesh_value();
#endif

View File

@ -289,7 +289,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
#if HAS_LINE_TO_Z
void line_to_z(const float &z) {
void line_to_z(const_float_t z) {
current_position.z = z;
line_to_current_position(manual_feedrate_mm_s.z);
}

View File

@ -40,7 +40,7 @@ typedef void (*selectFunc_t)();
#define SS_DEFAULT SS_CENTER
#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
void _lcd_zoffset_overlay_gfx(const float zvalue);
void _lcd_zoffset_overlay_gfx(const_float_t zvalue);
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) && Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
@ -212,11 +212,7 @@ void _lcd_draw_homing();
#define HAS_LINE_TO_Z ANY(DELTA, PROBE_MANUALLY, MESH_BED_LEVELING, LEVEL_BED_CORNERS)
#if HAS_LINE_TO_Z
void line_to_z(const float &z);
#endif
#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
void _lcd_zoffset_overlay_gfx(const float zvalue);
void line_to_z(const_float_t z);
#endif
#if ENABLED(PROBE_OFFSET_WIZARD)

View File

@ -86,7 +86,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
ui.goto_screen(_lcd_calibrate_homing);
}
void _goto_tower_a(const float &a) {
void _goto_tower_a(const_float_t a) {
xy_pos_t tower_vec = { cos(RADIANS(a)), sin(RADIANS(a)) };
_man_probe_pt(tower_vec * delta_calibration_radius());
}

View File

@ -77,8 +77,8 @@ template<typename NAME>
class TMenuEditItem : MenuEditItemBase {
private:
typedef typename NAME::type_t type_t;
static inline float scale(const float value) { return NAME::scale(value); }
static inline float unscale(const float value) { return NAME::unscale(value); }
static inline float scale(const_float_t value) { return NAME::scale(value); }
static inline float unscale(const_float_t value) { return NAME::unscale(value); }
static const char* to_string(const int32_t value) { return NAME::strfunc(unscale(value)); }
static void load(void *ptr, const int32_t value) { *((type_t*)ptr) = unscale(value); }
public:
@ -114,9 +114,9 @@ class TMenuEditItem : MenuEditItemBase {
#define DEFINE_MENU_EDIT_ITEM_TYPE(NAME, TYPE, STRFUNC, SCALE, V...) \
struct MenuEditItemInfo_##NAME { \
typedef TYPE type_t; \
static inline float scale(const float value) { return value * (SCALE) + (V+0); } \
static inline float unscale(const float value) { return value / (SCALE) + (V+0); } \
static inline const char* strfunc(const float value) { return STRFUNC(_DOFIX(TYPE,value)); } \
static inline float scale(const_float_t value) { return value * (SCALE) + (V+0); } \
static inline float unscale(const_float_t value) { return value / (SCALE) + (V+0); } \
static inline const char* strfunc(const_float_t value) { return STRFUNC(_DOFIX(TYPE,value)); } \
}; \
typedef TMenuEditItem<MenuEditItemInfo_##NAME> MenuItem_##NAME

View File

@ -149,7 +149,7 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
screenFunc_t _manual_move_func_ptr;
void _goto_manual_move(const float scale) {
void _goto_manual_move(const_float_t scale) {
ui.defer_status_screen();
ui.manual_move.menu_scale = scale;
ui.goto_screen(_manual_move_func_ptr);

View File

@ -58,14 +58,14 @@ inline void z_clearance_move() {
);
}
void set_offset_and_go_back(const float &z) {
void set_offset_and_go_back(const_float_t z) {
probe.offset.z = z;
SET_SOFT_ENDSTOP_LOOSE(false);
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
ui.goto_previous_screen_no_defer();
}
void _goto_manual_move_z(const float scale) {
void _goto_manual_move_z(const_float_t scale) {
ui.manual_move.menu_scale = scale;
ui.goto_screen(lcd_move_z);
}

View File

@ -92,7 +92,7 @@ void _lcd_mesh_fine_tune(PGM_P const msg) {
// Init mesh editing and go to the fine tuning screen (ubl.fine_tune_mesh)
// To capture encoder events UBL will also call ui.capture and ui.release.
//
void MarlinUI::ubl_mesh_edit_start(const float &initial) {
void MarlinUI::ubl_mesh_edit_start(const_float_t initial) {
TERN_(HAS_GRAPHICAL_TFT, clear_lcd());
mesh_edit_accumulator = initial;
goto_screen([]{ _lcd_mesh_fine_tune(GET_TEXT(MSG_MESH_EDIT_Z)); });