diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-04-26 21:04:15 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-04-26 21:04:15 +0300 |
commit | 9038f45ef266b614e994548b104338fcec9a3d40 (patch) | |
tree | 7356a455bafcdefa168bc970947423ee37d4d91f | |
parent | 26398c17732e2e6d15c8c3f869e37d0b68778858 (diff) |
Bug fix for Z probe not stopping CAN-connected delta tower motors
-rw-r--r-- | src/Movement/DDA.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp index 9df806b5..14714289 100644 --- a/src/Movement/DDA.cpp +++ b/src/Movement/DDA.cpp @@ -1422,11 +1422,15 @@ void DDA::Prepare(SimulationMode simMode) noexcept } const int32_t delta = endPoint[drive] - prev->endPoint[drive]; - if (platform.GetDriversBitmap(drive) != 0) // if any of the drives is local + if (platform.GetDriversBitmap(drive) != 0 // if any of the drives is local +#if SUPPORT_CAN_EXPANSION + || flags.checkEndstops // if checking endstops, create a DM even if there are no local drives involved +#endif + ) { DriveMovement* const pdm = DriveMovement::Allocate(drive, DMState::idle); pdm->direction = (delta >= 0); - pdm->totalSteps = labs(delta); // this is net steps for now + pdm->totalSteps = labs(delta); // this is net steps for now if (pdm->PrepareDeltaAxis(*this, params)) { pdm->directionChanged = false; |