From 9161ccc15ce93405ef658a4096acbf63db68b32c Mon Sep 17 00:00:00 2001 From: David Crocker Date: Fri, 23 Sep 2022 08:54:18 +0100 Subject: Fixed issue on MB6XD with endstops/Z probes stopping external drivers --- src/Movement/DDA.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp index 5ea10f5b..751841c0 100644 --- a/src/Movement/DDA.cpp +++ b/src/Movement/DDA.cpp @@ -1498,7 +1498,7 @@ void DDA::Prepare(SimulationMode simMode) noexcept 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 + || flags.checkEndstops // if checking endstops or a Z probe, create a DM even if there are no local drives involved #endif ) { @@ -2061,12 +2061,12 @@ void DDA::StepDrivers(Platform& p, uint32_t now) noexcept // Trigger the TC so that it generates a step pulse STEP_GATE_TC->TC_CHANNEL[STEP_GATE_TC_CHAN].TC_CCR = TC_CCR_SWTRG; lastStepHighTime = StepTimer::GetTimerTicks(); + } - // Calculate the next step times - for (DriveMovement *dm2 = activeDMs; dm2 != dm; dm2 = dm2->nextDM) - { - (void)dm2->CalcNextStepTime(*this); // calculate next step times - } + // Calculate the next step times. We must do this even if no local drivers are stepping in case endstops or Z probes are active. + for (DriveMovement *dm2 = activeDMs; dm2 != dm; dm2 = dm2->nextDM) + { + (void)dm2->CalcNextStepTime(*this); // calculate next step times } #else # if SUPPORT_SLOW_DRIVERS // if supporting slow drivers -- cgit v1.2.3