diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-04-30 20:44:24 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-04-30 20:44:24 +0300 |
commit | 4c0d60f194195db1046b58d1d0edbc0a29a04449 (patch) | |
tree | 4239097714d88c9e5b74387bd9fb09f3e0a697eb | |
parent | 2b9362496df17b3e0bf63ee76256f4a7eeaba2e6 (diff) |
Fixed bug with nonlinear extrusion
-rw-r--r-- | src/Movement/DDA.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp index 14714289..7abd7a5c 100644 --- a/src/Movement/DDA.cpp +++ b/src/Movement/DDA.cpp @@ -1547,7 +1547,7 @@ void DDA::Prepare(SimulationMode simMode) noexcept { const NonlinearExtrusion& nl = platform.GetExtrusionCoefficients(extruder); float& dv = directionVector[drive]; - const float averageExtrusionSpeed = (totalDistance * dv)/clocksNeeded; + const float averageExtrusionSpeed = (totalDistance * dv * StepClockRate)/clocksNeeded; // need speed in mm/sec for nonlinear extrusion calculation const float factor = 1.0 + min<float>((averageExtrusionSpeed * nl.A) + (averageExtrusionSpeed * averageExtrusionSpeed * nl.B), nl.limit); dv *= factor; } |