|
@ -162,8 +162,9 @@ int32_t Backlash::get_applied_steps(const AxisEnum axis) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class Backlash::StepAdjuster { |
|
|
class Backlash::StepAdjuster { |
|
|
|
|
|
private: |
|
|
xyz_long_t applied_steps; |
|
|
xyz_long_t applied_steps; |
|
|
public: |
|
|
public: |
|
|
StepAdjuster() { |
|
|
StepAdjuster() { |
|
|
LOOP_NUM_AXES(axis) applied_steps[axis] = backlash.get_applied_steps((AxisEnum)axis); |
|
|
LOOP_NUM_AXES(axis) applied_steps[axis] = backlash.get_applied_steps((AxisEnum)axis); |
|
|
} |
|
|
} |
|
@ -173,21 +174,25 @@ public: |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
void Backlash::set_correction_uint8(const uint8_t v) { |
|
|
#if ENABLED(BACKLASH_GCODE) |
|
|
|
|
|
|
|
|
|
|
|
void Backlash::set_correction_uint8(const uint8_t v) { |
|
|
StepAdjuster adjuster; |
|
|
StepAdjuster adjuster; |
|
|
correction = v; |
|
|
correction = v; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Backlash::set_distance_mm(const AxisEnum axis, const float v) { |
|
|
void Backlash::set_distance_mm(const AxisEnum axis, const float v) { |
|
|
StepAdjuster adjuster; |
|
|
StepAdjuster adjuster; |
|
|
distance_mm[axis] = v; |
|
|
distance_mm[axis] = v; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#ifdef BACKLASH_SMOOTHING_MM |
|
|
#ifdef BACKLASH_SMOOTHING_MM |
|
|
void Backlash::set_smoothing_mm(const float v) { |
|
|
void Backlash::set_smoothing_mm(const float v) { |
|
|
StepAdjuster adjuster; |
|
|
StepAdjuster adjuster; |
|
|
smoothing_mm = v; |
|
|
smoothing_mm = v; |
|
|
} |
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) |
|
|
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) |
|
|