Improvements for junction_deviation_mm
- Drop `max_jerk` with `JUNCTION_DEVIATION` - Add `max_e_jerk_factor` for use by `LIN_ADVANCE` - Recalculate `max_e_jerk_factor` when `junction_deviation_mm` changes - Fix LCD editing of `junction_deviation_mm`
This commit is contained in:
@ -195,21 +195,25 @@ class Planner {
|
||||
// May be auto-adjusted by a filament width sensor
|
||||
#endif
|
||||
|
||||
static uint32_t max_acceleration_steps_per_s2[XYZE_N],
|
||||
max_acceleration_mm_per_s2[XYZE_N], // Use M201 to override
|
||||
min_segment_time_us; // Use 'M205 B<µs>' to override
|
||||
static float max_feedrate_mm_s[XYZE_N], // Max speeds in mm per second
|
||||
axis_steps_per_mm[XYZE_N],
|
||||
steps_to_mm[XYZE_N],
|
||||
min_feedrate_mm_s,
|
||||
acceleration, // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX
|
||||
retract_acceleration, // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
|
||||
travel_acceleration, // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
|
||||
max_jerk[XYZE], // The largest speed change requiring no acceleration
|
||||
min_travel_feedrate_mm_s;
|
||||
static uint32_t max_acceleration_mm_per_s2[XYZE_N], // (mm/s^2) M201 XYZE
|
||||
max_acceleration_steps_per_s2[XYZE_N], // (steps/s^2) Derived from mm_per_s2
|
||||
min_segment_time_us; // (µs) M205 B
|
||||
static float max_feedrate_mm_s[XYZE_N], // (mm/s) M203 XYZE - Max speeds
|
||||
axis_steps_per_mm[XYZE_N], // (steps) M92 XYZE - Steps per millimeter
|
||||
steps_to_mm[XYZE_N], // (mm) Millimeters per step
|
||||
min_feedrate_mm_s, // (mm/s) M205 S - Minimum linear feedrate
|
||||
acceleration, // (mm/s^2) M204 S - Normal acceleration. DEFAULT ACCELERATION for all printing moves.
|
||||
retract_acceleration, // (mm/s^2) M204 R - Retract acceleration. Filament pull-back and push-forward while standing still in the other axes
|
||||
travel_acceleration, // (mm/s^2) M204 T - Travel acceleration. DEFAULT ACCELERATION for all NON printing moves.
|
||||
min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
static float junction_deviation_mm; // Initialized by EEPROM
|
||||
static float junction_deviation_mm; // (mm) M205 J
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
static float max_e_jerk_factor; // Calculated from junction_deviation_mm
|
||||
#endif
|
||||
#else
|
||||
static float max_jerk[XYZE]; // (mm/s^2) M205 XYZE - The largest speed change requiring no acceleration.
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
@ -745,6 +749,14 @@ class Planner {
|
||||
static void autotemp_M104_M109();
|
||||
#endif
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
FORCE_INLINE static void recalculate_max_e_jerk_factor() {
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
max_e_jerk_factor = SQRT(SQRT(0.5) * junction_deviation_mm) * RECIPROCAL(1.0 - SQRT(0.5));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user