️ Optimal recalculate_max_e_jerk

This commit is contained in:
Scott Lahteine 2025-05-08 13:45:38 -05:00
parent aa7af2e2ea
commit 72f3a4ac31

View file

@ -1088,8 +1088,8 @@ class Planner {
#if HAS_LINEAR_E_JERK
FORCE_INLINE static void recalculate_max_e_jerk() {
const float prop = junction_deviation_mm * SQRT(0.5) / (1.0f - SQRT(0.5));
EXTRUDER_LOOP()
max_e_jerk[E_INDEX_N(e)] = SQRT(prop * settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
for (uint8_t i = 0; i < DISTINCT_E; ++i)
max_e_jerk[i] = SQRT(prop * settings.max_acceleration_mm_per_s2[E_AXIS + i]);
}
#endif