diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-07-26 16:26:27 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-07-26 16:26:27 +0300 |
commit | 040d9975e375241352b5d907ab362ab47ef8a937 (patch) | |
tree | b193fbb5b16c625e850b94a0a93d85415a3f85f7 /src/Movement | |
parent | 5386c03cbbe3a7a0eb725694ce990e80a4e4601e (diff) |
Another fix for extrusion in expansion board mode
Diffstat (limited to 'src/Movement')
-rw-r--r-- | src/Movement/DriveMovement.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Movement/DriveMovement.cpp b/src/Movement/DriveMovement.cpp index 86fc214b..deca30e2 100644 --- a/src/Movement/DriveMovement.cpp +++ b/src/Movement/DriveMovement.cpp @@ -273,7 +273,11 @@ bool DriveMovement::PrepareCartesianAxis(const DDA& dda, const PrepParams& param timeSoFar = 0.0; mp.cart.pressureAdvanceK = 0.0; // We can't use directionVector here because those values relate to Cartesian space, whereas we may be CoreXY etc. - mp.cart.effectiveStepsPerMm = (float)totalSteps/dda.totalDistance; + mp.cart.effectiveStepsPerMm = +#if SUPPORT_REMOTE_COMMANDS + (dda.flags.isRemote) ? (float)totalSteps : +#endif + (float)totalSteps/dda.totalDistance; mp.cart.effectiveMmPerStep = 1.0/mp.cart.effectiveStepsPerMm; isDelta = false; isExtruder = false; @@ -414,8 +418,11 @@ bool DriveMovement::PrepareDeltaAxis(const DDA& dda, const PrepParams& params) n // We have already generated the extruder segments and we know that there are some bool DriveMovement::PrepareExtruder(const DDA& dda, const PrepParams& params) noexcept { - const float stepsPerMm = reprap.GetPlatform().DriveStepsPerUnit(drive); - const float effStepsPerMm = stepsPerMm * fabsf(dda.directionVector[drive]); + const float effStepsPerMm = +#if SUPPORT_REMOTE_COMMANDS + (dda.flags.isRemote) ? (float)totalSteps : +#endif + reprap.GetPlatform().DriveStepsPerUnit(drive) * fabsf(dda.directionVector[drive]); const float effMmPerStep = 1.0/effStepsPerMm; ExtruderShaper& shaper = reprap.GetMove().GetExtruderShaper( |