Skip to content

Commit aae08e9

Browse files
authored
🐛 Fix XATC divide-by-zero (MarlinFirmware#23743)
1 parent cd4c1be commit aae08e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void XATC::print_points() {
4949
float lerp(const_float_t t, const_float_t a, const_float_t b) { return a + t * (b - a); }
5050

5151
float XATC::compensation(const xy_pos_t &raw) {
52+
if (NEAR_ZERO(spacing)) return 0;
5253
float t = (raw.x - start) / spacing;
5354
int i = FLOOR(t);
5455
LIMIT(i, 0, XATC_MAX_POINTS - 2);

0 commit comments

Comments
 (0)