Skip to content

Commit fb2cf0f

Browse files
committed
Removed S-curve code and build configuration
1 parent bb819bf commit fb2cf0f

File tree

13 files changed

+20
-1285
lines changed

13 files changed

+20
-1285
lines changed

.cproject

Lines changed: 0 additions & 184 deletions
Large diffs are not rendered by default.

src/CAN/CanMotion.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,8 @@ CanMessageBuffer *_ecv_null CanMotion::GetBuffer(const PrepParams& params, Drive
138138
move->decelClocks = buf->next->msg.moveLinearShaped.decelClocks;
139139
}
140140

141-
#if SUPPORT_S_CURVE
142-
if (params.jerk != 0.0)
143-
{
144-
// We don't support S-curve acceleration on expansion boards, so the best we can do is compute an average acceleration and scale it to unit distance
145-
move->acceleration = (params.peakAcceleration * params.TotalAccelClocks() - 0.5 * params.jerk * (fsquare(params.accelStartClocks) + fsquare(params.accelEndClocks)))/(params.TotalAccelClocks() * params.totalDistance);
146-
move->deceleration = (-params.peakDeceleration * params.TotalDecelClocks() - 0.5 * params.jerk * (fsquare(params.decelStartClocks) + fsquare(params.decelEndClocks)))/(params.TotalDecelClocks() * params.totalDistance);
147-
}
148-
else
149-
{
150-
move->acceleration = params.peakAcceleration/params.totalDistance; // scale the acceleration to correspond to unit distance
151-
move->deceleration = -params.peakDeceleration/params.totalDistance; // scale the deceleration to correspond to unit distance
152-
}
153-
#else
154141
move->acceleration = params.acceleration/params.totalDistance; // scale the acceleration to correspond to unit distance
155142
move->deceleration = -params.deceleration/params.totalDistance; // scale the deceleration to correspond to unit distance
156-
#endif
157143
move->extruderDrives = 0;
158144
move->numDrivers = canDriver.localDriver + 1;
159145
move->zero1 = move->zero2 = 0;

src/Config/Pins.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,6 @@
259259
#define SUPPORT_PHASE_STEPPING 0
260260
#endif
261261

262-
#ifdef SUPPORT_S_CURVE
263-
# if SUPPORT_S_CURVE && !SUPPORT_PHASE_STEPPING
264-
# error Cannot support S Curve acceleration without phase stepping
265-
# endif
266-
#else
267-
# define SUPPORT_S_CURVE 0
268-
#endif
269-
270262
#ifndef SUPPORT_PROBE_POINTS_FILE
271263
# define SUPPORT_PROBE_POINTS_FILE 0
272264
#endif
@@ -315,7 +307,7 @@
315307

316308
// Define SUPPORT_REMOTE_COMMANDS according to whether this hardware accepts commands over CAN
317309
#ifndef SUPPORT_REMOTE_COMMANDS
318-
# define SUPPORT_REMOTE_COMMANDS (SUPPORT_CAN_EXPANSION && !defined(DUET3_ATE) && !SUPPORT_S_CURVE)
310+
# define SUPPORT_REMOTE_COMMANDS (SUPPORT_CAN_EXPANSION && !defined(DUET3_ATE))
319311
#endif
320312

321313
#ifndef SUPPORT_SCANNING_PROBES

src/GCodes/GCodes2.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,25 +2448,8 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
24482448
}
24492449
}
24502450

2451-
#if SUPPORT_S_CURVE
2452-
if (frac < 1 && gb.Seen('T'))
2453-
{
2454-
if (!LockAllMovementSystemsAndWaitForStandstill(gb))
2455-
{
2456-
return false;
2457-
}
2458-
move.SetAccelerationTime(gb.GetNonNegativeFValue());
2459-
seen = true;
2460-
}
2461-
#endif
24622451
if (seen)
24632452
{
2464-
#if SUPPORT_S_CURVE
2465-
if (frac < 1)
2466-
{
2467-
move.UpdateSCurveFlagAndJerk();
2468-
}
2469-
#endif
24702453
reprap.MoveUpdated();
24712454
}
24722455
else
@@ -2483,21 +2466,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
24832466
reply.catf("%c%.1f", sep, (double)InverseConvertAcceleration(move.Acceleration(ExtruderToLogicalDrive(extruder), frac == 1)));
24842467
sep = ':';
24852468
}
2486-
#if SUPPORT_S_CURVE
2487-
if (frac < 1)
2488-
{
2489-
reply.catf(", acceleration time %.2f sec", (double)(move.AccelerationTime() * (1.0/StepClockRate)));
2490-
}
2491-
#endif
24922469
}
2493-
2494-
#if SUPPORT_S_CURVE
2495-
if (frac < 1 && move.AccelerationTime() != 0.0 && !move.IsUsingSCurve())
2496-
{
2497-
reply.lcat("Acceleration time (S-curve acceleration) is disabled because phase stepping is not enabled");
2498-
result = GCodeResult::warning;
2499-
}
2500-
#endif
25012470
}
25022471
break;
25032472

src/GCodes/GCodes3.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,6 @@ GCodeResult GCodes::DoDriveMapping(GCodeBuffer& gb, const StringRef& reply) THRO
569569

570570
if (seen || seenExtrude)
571571
{
572-
#if SUPPORT_S_CURVE
573-
move.UpdateSCurveFlagAndJerk();
574-
#endif
575572
reprap.MoveUpdated();
576573
#if SUPPORT_CAN_EXPANSION
577574
rslt = max(rslt, move.UpdateRemoteStepsPerMmAndMicrostepping(axesToUpdate, reply));
@@ -909,9 +906,6 @@ GCodeResult GCodes::ConfigureStepMode(GCodeBuffer& gb, const StringRef& reply) T
909906

910907
if (seen)
911908
{
912-
#if SUPPORT_S_CURVE
913-
move.UpdateSCurveFlagAndJerk();
914-
#endif
915909
reprap.MoveUpdated();
916910
}
917911
else

0 commit comments

Comments
 (0)