extruder: Don't do pressure advance on velocity changes due to cornering
Due to the lookahead, small changes in the direction of the toolhead cause minor changes in toolhead velocity. These "cornering" velocity changes cause the current extruder code to trigger pressure advance and its associated pressure retract. This causes the extruder to rapidly "jerk" the filament. This code change updates the extruder to detect velocity changes due solely to cornering and avoid pressure advance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -59,8 +59,15 @@ class PrinterExtruder:
|
||||
prev_pressure_d += extra_accel_d
|
||||
# Update decel and retract parameters when decelerating
|
||||
if decel_t:
|
||||
npd = move.end_v * move_extrude_r * self.pressure_advance
|
||||
extra_decel_d = prev_pressure_d - npd
|
||||
if move.corner_min:
|
||||
npd = move.corner_max*move_extrude_r * self.pressure_advance
|
||||
extra_decel_d = prev_pressure_d - npd
|
||||
if move.end_v > move.corner_min:
|
||||
extra_decel_d *= ((move.cruise_v - move.end_v)
|
||||
/ (move.cruise_v - move.corner_min))
|
||||
else:
|
||||
npd = move.end_v * move_extrude_r * self.pressure_advance
|
||||
extra_decel_d = prev_pressure_d - npd
|
||||
if extra_decel_d > 0.:
|
||||
extra_decel_v = extra_decel_d / decel_t
|
||||
decel_v -= extra_decel_v
|
||||
|
||||
Reference in New Issue
Block a user