Clean up, optimize ExtUI/TFT code (#21333)
This commit is contained in:
@@ -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&, const axis_t);
|
||||
void setAxisCurrent_mA(const float&, const extruder_t);
|
||||
|
||||
int getTMCBumpSensitivity(const axis_t);
|
||||
void setTMCBumpSensitivity(const float, const axis_t);
|
||||
void setTMCBumpSensitivity(const float&, const axis_t);
|
||||
#endif
|
||||
|
||||
float getActualTemp_celsius(const heater_t);
|
||||
@@ -150,10 +150,10 @@ 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 setMeshPoint(const xy_uint8_t &pos, const float &zval);
|
||||
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 &zval);
|
||||
inline void onMeshUpdate(const xy_int8_t &pos, const float &zval) { onMeshUpdate(pos.x, pos.y, zval); }
|
||||
|
||||
typedef enum : uint8_t {
|
||||
MESH_START, // Prior to start of probe
|
||||
@@ -178,41 +178,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 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 setTargetTemp_celsius(const float&, const heater_t);
|
||||
void setTargetTemp_celsius(const float&, const extruder_t);
|
||||
void setTargetFan_percent(const float&, 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 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&, const axis_t);
|
||||
void setAxisMaxAcceleration_mm_s2(const float&, 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&);
|
||||
void setRetractAcceleration_mm_s2(const float&);
|
||||
void setTravelAcceleration_mm_s2(const float&);
|
||||
void setFeedrate_percent(const float&);
|
||||
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&, const extruder_t);
|
||||
#endif
|
||||
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
float getJunctionDeviation_mm();
|
||||
void setJunctionDeviation_mm(const float);
|
||||
void setJunctionDeviation_mm(const float&);
|
||||
#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&, const axis_t);
|
||||
void setAxisMaxJerk_mm_s(const float&, const extruder_t);
|
||||
#endif
|
||||
|
||||
extruder_t getTool(const uint8_t extruder);
|
||||
@@ -220,7 +221,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& 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);
|
||||
@@ -228,28 +229,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&, 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&);
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
float getProbeOffset_mm(const axis_t);
|
||||
void setProbeOffset_mm(const float, const axis_t);
|
||||
void setProbeOffset_mm(const float&, 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&, const axis_t);
|
||||
|
||||
float getBacklashCorrection_percent();
|
||||
void setBacklashCorrection_percent(const float);
|
||||
void setBacklashCorrection_percent(const float&);
|
||||
|
||||
#ifdef BACKLASH_SMOOTHING_MM
|
||||
float getBacklashSmoothing_mm();
|
||||
void setBacklashSmoothing_mm(const float);
|
||||
void setBacklashSmoothing_mm(const float&);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -261,7 +262,7 @@ namespace ExtUI {
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float getFilamentRunoutDistance_mm();
|
||||
void setFilamentRunoutDistance_mm(const float);
|
||||
void setFilamentRunoutDistance_mm(const float&);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -271,7 +272,7 @@ namespace ExtUI {
|
||||
|
||||
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
|
||||
float getCaseLightBrightness_percent();
|
||||
void setCaseLightBrightness_percent(const float);
|
||||
void setCaseLightBrightness_percent(const float&);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -279,16 +280,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&, const float&, const float&, extruder_t);
|
||||
void startPIDTune(const float&, 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&, const float&, const float&);
|
||||
void startBedPIDTune(const float&);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user