Browse Source

🐛 Fix XATC divide-by-zero (#23743)

FB4S_WIFI
Giuseppe499 3 years ago
committed by Scott Lahteine
parent
commit
bfdb7c7135
  1. 1
      Marlin/src/feature/bedlevel/abl/x_twist.cpp

1
Marlin/src/feature/bedlevel/abl/x_twist.cpp

@ -49,6 +49,7 @@ void XATC::print_points() {
float lerp(const_float_t t, const_float_t a, const_float_t b) { return a + t * (b - a); }
float XATC::compensation(const xy_pos_t &raw) {
if (NEAR_ZERO(spacing)) return 0;
float t = (raw.x - start) / spacing;
int i = FLOOR(t);
LIMIT(i, 0, XATC_MAX_POINTS - 2);

Loading…
Cancel
Save