diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-10-22 23:35:16 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-10-22 23:35:16 +0300 |
commit | 8a9e12718b8161283dba0d54907e5586b560993b (patch) | |
tree | 552c1be769028da59b9007af67e9ee8b9f15f5ef /src/Movement | |
parent | 89e64be0cb6b8fb9f39a5fac0c47fc8d91ce137d (diff) |
Reduce acceleration when homing using stall detection
Diffstat (limited to 'src/Movement')
-rw-r--r-- | src/Movement/DDA.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp index 1efc9b90..69626146 100644 --- a/src/Movement/DDA.cpp +++ b/src/Movement/DDA.cpp @@ -459,9 +459,20 @@ bool DDA::InitStandardMove(DDARing& ring, const RawMove &nextMove, bool doMotorM #endif // If it's a Z probing move, limit the Z acceleration to better handle nozzle-contact probes - if (nextMove.reduceAcceleration && accelerations[Z_AXIS] > ZProbeMaxAcceleration) + if (nextMove.reduceAcceleration) { - accelerations[Z_AXIS] = ZProbeMaxAcceleration; + if (accelerations[X_AXIS] > XYStallEndstopMaxAcceleration) + { + accelerations[X_AXIS] = XYStallEndstopMaxAcceleration; + } + if (accelerations[Y_AXIS] > XYStallEndstopMaxAcceleration) + { + accelerations[Y_AXIS] = XYStallEndstopMaxAcceleration; + } + if (accelerations[Z_AXIS] > ZProbeMaxAcceleration) + { + accelerations[Z_AXIS] = ZProbeMaxAcceleration; + } } // 4. Normalise the direction vector and compute the amount of motion. |