diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-11-05 14:40:28 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-11-05 14:40:28 +0300 |
commit | 3b2f8c98a7e32c3d8fd90cafa77e6ba63ab22737 (patch) | |
tree | 0949ac382e19fbda523488d60ee1d4b66d374d23 /src/Movement | |
parent | e07e82db07d0962efd26cdef2d302128b4772d6d (diff) |
Introduced reduced accelerations and M201.1
Corrected setting of default max speeds, accelerations and jerks
Added M201.1 to allow the reduced accelerations to be set
Diffstat (limited to 'src/Movement')
-rw-r--r-- | src/Movement/DDA.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp index 4f210de6..7958a71b 100644 --- a/src/Movement/DDA.cpp +++ b/src/Movement/DDA.cpp @@ -325,7 +325,7 @@ bool DDA::InitStandardMove(DDARing& ring, const RawMove &nextMove, bool doMotorM bool extrudersMoving = false; bool forwardExtruding = false; float accelerations[MaxAxesPlusExtruders]; - const float * const normalAccelerations = reprap.GetPlatform().Accelerations(); + const float * const normalAccelerations = reprap.GetPlatform().Accelerations(nextMove.reduceAcceleration); for (size_t drive = 0; drive < MaxAxesPlusExtruders; drive++) { @@ -458,23 +458,6 @@ 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) - { - 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. // NIST standard section 2.1.2.5 rule A: if any of XYZ is moving then the feed rate specifies the linear XYZ movement // We treat additional linear axes the same as XYZ @@ -609,7 +592,7 @@ bool DDA::InitLeadscrewMove(DDARing& ring, float feedrate, const float adjustmen tool = nullptr; filePos = prev->filePos; flags.endCoordinatesValid = prev->flags.endCoordinatesValid; - acceleration = deceleration = reprap.GetPlatform().Accelerations()[Z_AXIS]; + acceleration = deceleration = reprap.GetPlatform().Acceleration(Z_AXIS); #if SUPPORT_LASER && SUPPORT_IOBITS if (reprap.GetGCodes().GetMachineType() == MachineType::laser) |