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/Platform/Platform.cpp | |
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/Platform/Platform.cpp')
-rw-r--r-- | src/Platform/Platform.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index 69eb67f5..9d935855 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -609,25 +609,27 @@ void Platform::Init() noexcept axisMinima[axis] = DefaultAxisMinimum; axisMaxima[axis] = DefaultAxisMaximum; - maxFeedrates[axis] = DefaultXYMaxFeedrate; - accelerations[axis] = DefaultXYAcceleration; - driveStepsPerUnit[axis] = DefaultXYDriveStepsPerUnit; - instantDvs[axis] = DefaultXYInstantDv; + maxFeedrates[axis] = ConvertSpeedFromMmPerSec(DefaultAxisMaxFeedrate); + normalAccelerations[axis] = ConvertAcceleration(DefaultAxisAcceleration); + reducedAccelerations[axis] = ConvertAcceleration(DefaultReducedAxisAcceleration); + driveStepsPerUnit[axis] = DefaultAxisDriveStepsPerUnit; + instantDvs[axis] = ConvertSpeedFromMmPerSec(DefaultAxisInstantDv); } // We use different defaults for the Z axis - maxFeedrates[Z_AXIS] = DefaultZMaxFeedrate; - accelerations[Z_AXIS] = DefaultZAcceleration; + maxFeedrates[Z_AXIS] = ConvertSpeedFromMmPerSec(DefaultZMaxFeedrate); + normalAccelerations[Z_AXIS] = ConvertAcceleration(DefaultZAcceleration); + reducedAccelerations[Z_AXIS] = ConvertAcceleration(DefaultReducedZAcceleration); driveStepsPerUnit[Z_AXIS] = DefaultZDriveStepsPerUnit; - instantDvs[Z_AXIS] = DefaultZInstantDv; + instantDvs[Z_AXIS] = ConvertSpeedFromMmPerSec(DefaultZInstantDv); // Extruders for (size_t drive = MaxAxes; drive < MaxAxesPlusExtruders; ++drive) { - maxFeedrates[drive] = DefaultEMaxFeedrate; - accelerations[drive] = DefaultEAcceleration; + maxFeedrates[drive] = ConvertSpeedFromMmPerSec(DefaultEMaxFeedrate); + normalAccelerations[drive] = reducedAccelerations[drive] = ConvertAcceleration(DefaultEAcceleration); driveStepsPerUnit[drive] = DefaultEDriveStepsPerUnit; - instantDvs[drive] = DefaultEInstantDv; + instantDvs[drive] = ConvertSpeedFromMmPerSec(DefaultEInstantDv); } minimumMovementSpeed = ConvertSpeedFromMmPerSec(DefaultMinFeedrate); |