diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-12-23 23:13:35 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-12-23 23:13:35 -0500 |
commit | f3a49604f1fdbefc87010fb2a51070c7421aa7f0 (patch) | |
tree | 73587ee6c1404bd0cbff35850a8ebae87a83a1b3 | |
parent | 3576dd6e874a946843b7e8332a6d98cf30be1930 (diff) | |
download | kutter-f3a49604f1fdbefc87010fb2a51070c7421aa7f0.tar.gz kutter-f3a49604f1fdbefc87010fb2a51070c7421aa7f0.tar.xz kutter-f3a49604f1fdbefc87010fb2a51070c7421aa7f0.zip |
stepcompress: Increase check on max count to 10000000
Some motors have very small step distances and they can generate over
a million steps during a homing operation. Increase the maximum count
to ten million to avoid triggering the internal sanity check.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | klippy/stepcompress.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/stepcompress.c b/klippy/stepcompress.c index 34578935..e52b1035 100644 --- a/klippy/stepcompress.c +++ b/klippy/stepcompress.c @@ -395,7 +395,7 @@ stepcompress_push_factor(struct stepcompress *sc step_offset = -step_offset; } int count = steps + .5 - step_offset; - if (count <= 0 || count > 1000000) { + if (count <= 0 || count > 10000000) { if (count && steps) errorf("push_factor invalid count %d %f %f %f %f" , sc->oid, steps, step_offset, clock_offset, factor); @@ -429,7 +429,7 @@ stepcompress_push_sqrt(struct stepcompress *sc, double steps, double step_offset step_offset = -step_offset; } int count = steps + .5 - step_offset; - if (count <= 0 || count > 1000000) { + if (count <= 0 || count > 10000000) { if (count && steps) errorf("push_sqrt invalid count %d %f %f %f %f %f" , sc->oid, steps, step_offset, clock_offset, sqrt_offset @@ -463,7 +463,7 @@ stepcompress_push_delta_const( double reldist = closestxy_d - movexy_r*dist; double end_height = safe_sqrt(closest_height2 - reldist*reldist); int count = (end_height - height + movez_r*dist) / step_dist + .5; - if (count <= 0 || count > 1000000) { + if (count <= 0 || count > 10000000) { if (count) errorf("push_delta_const invalid count %d %d %f %f %f %f %f %f %f %f" , sc->oid, count, clock_offset, dist, step_dist, start_pos @@ -519,7 +519,7 @@ stepcompress_push_delta_accel( double reldist = closestxy_d - movexy_r*dist; double end_height = safe_sqrt(closest_height2 - reldist*reldist); int count = (end_height - height + movez_r*dist) / step_dist + .5; - if (count <= 0 || count > 1000000) { + if (count <= 0 || count > 10000000) { if (count) errorf("push_delta_accel invalid count %d %d %f %f %f %f %f %f %f %f" , sc->oid, count, clock_offset, dist, step_dist, start_pos |