Skip to content

Commit

Permalink
Fix build error for ftdi_eve_touch_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tombrazier committed Feb 28, 2022
1 parent e6da6fe commit 3e4e0e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Marlin/src/lcd/extui/ui_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,16 +861,16 @@ namespace ExtUI {
#endif

#if ENABLED(BACKLASH_GCODE)
float getAxisBacklash_mm(const axis_t axis) { return backlash.distance_mm[axis]; }
float getAxisBacklash_mm(const axis_t axis) { return backlash.get_distance_mm((AxisEnum)axis); }
void setAxisBacklash_mm(const_float_t value, const axis_t axis)
{ backlash.distance_mm[axis] = constrain(value,0,5); }
{ backlash.set_distance_mm((AxisEnum)axis, constrain(value,0,5)); }

float getBacklashCorrection_percent() { return ui8_to_percent(backlash.correction); }
void setBacklashCorrection_percent(const_float_t value) { backlash.correction = map(constrain(value, 0, 100), 0, 100, 0, 255); }
float getBacklashCorrection_percent() { return backlash.get_correction() * 100.0f; }
void setBacklashCorrection_percent(const_float_t value) { backlash.set_correction(constrain(value, 0, 100) / 100.0f); }

#ifdef BACKLASH_SMOOTHING_MM
float getBacklashSmoothing_mm() { return backlash.smoothing_mm; }
void setBacklashSmoothing_mm(const_float_t value) { backlash.smoothing_mm = constrain(value, 0, 999); }
float getBacklashSmoothing_mm() { return backlash.get_smoothing_mm(); }
void setBacklashSmoothing_mm(const_float_t value) { backlash.set_smoothing_mm(constrain(value, 0, 999)); }
#endif
#endif

Expand Down

0 comments on commit 3e4e0e5

Please sign in to comment.