Skip to content

Commit fc7c5c9

Browse files
author
Luca Toniolo
committed
tp.c: remove unused tpGetScaledAccel (fixes #3720)
Function was never called; dead code
1 parent 441adf8 commit fc7c5c9

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/emc/tp/tp.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -359,25 +359,6 @@ STATIC inline double tpGetRealFinalVel(TP_STRUCT const * const tp,
359359
/**
360360
* Get acceleration for a tc based on the trajectory planner state.
361361
*/
362-
STATIC inline double tpGetScaledAccel(TP_STRUCT const * const tp __attribute__((unused)),
363-
TC_STRUCT const * const tc) {
364-
double a_scale = tc->maxaccel;
365-
/* Parabolic blending conditions: If the next segment or previous segment
366-
* has a parabolic blend with this one, acceleration is scaled down by 1/2
367-
* so that the sum of the two does not exceed the maximum.
368-
*/
369-
if (tc->term_cond == TC_TERM_COND_PARABOLIC || tc->blend_prev) {
370-
a_scale *= 0.5;
371-
}
372-
else {
373-
a_scale *= 8.0/15.0;
374-
}
375-
if (tc->motion_type == TC_CIRCULAR || tc->motion_type == TC_SPHERICAL) {
376-
//Limit acceleration for cirular arcs to allow for normal acceleration
377-
a_scale *= tc->acc_ratio_tan;
378-
}
379-
return a_scale;
380-
}
381362

382363
/**
383364
* Convert the 2-part spindle position and sign to a signed double.

0 commit comments

Comments
 (0)