🐛 Fix steps-to-mm with backlash (#23814)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
tombrazier
2022-02-26 20:30:33 +00:00
committed by GitHub
parent 103b5f1ead
commit 87c4cd20e5
3 changed files with 54 additions and 13 deletions

View File

@@ -27,6 +27,12 @@
constexpr uint8_t all_on = 0xFF, all_off = 0x00;
class Backlash {
private:
static axis_bits_t last_direction_bits;
#ifdef BACKLASH_SMOOTHING_MM
static xyz_long_t residual_error;
#endif
public:
#if ENABLED(BACKLASH_GCODE)
static xyz_float_t distance_mm;
@@ -71,7 +77,8 @@ public:
return has_measurement(X_AXIS) || has_measurement(Y_AXIS) || has_measurement(Z_AXIS);
}
void add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const axis_bits_t dm, block_t * const block);
static void add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const axis_bits_t dm, block_t * const block);
static int32_t applied_steps(const AxisEnum axis);
};
extern Backlash backlash;