diff --git a/config/avrsim.cfg b/config/avrsim.cfg index e8b18717..9fbcfb7c 100644 --- a/config/avrsim.cfg +++ b/config/avrsim.cfg @@ -42,6 +42,8 @@ step_pin: ar19 dir_pin: ar18 enable_pin: ar25 step_distance: .004242 +nozzle_diameter: 0.500 +filament_diameter: 3.500 max_velocity: 200000 max_accel: 3000 heater_pin: ar4 diff --git a/config/example-delta.cfg b/config/example-delta.cfg index 1155a06f..41e238ec 100644 --- a/config/example-delta.cfg +++ b/config/example-delta.cfg @@ -46,6 +46,8 @@ step_pin: ar26 dir_pin: ar28 enable_pin: !ar24 step_distance: .0022 +nozzle_diameter: 0.400 +filament_diameter: 1.750 max_velocity: 200 max_accel: 3000 heater_pin: ar10 diff --git a/config/example.cfg b/config/example.cfg index 1113351b..75684d16 100644 --- a/config/example.cfg +++ b/config/example.cfg @@ -109,6 +109,12 @@ step_pin: ar19 dir_pin: ar18 enable_pin: !ar25 step_distance: .004242 +nozzle_diameter: 0.500 +# Diameter of the nozzle orifice (in mm). This parameter must be +# provided. +filament_diameter: 3.500 +# Diameter of the raw filament (in mm) as it enters the +# extruder. This parameter must be provided. max_velocity: 200000 # Maximum velocity (in mm/s) of the extruder motor for extrude only # moves. This parameter must be provided. diff --git a/config/makergear-m2-2012.cfg b/config/makergear-m2-2012.cfg index 78e32968..83deee9b 100644 --- a/config/makergear-m2-2012.cfg +++ b/config/makergear-m2-2012.cfg @@ -48,6 +48,8 @@ step_pin: PC3 dir_pin: PL6 enable_pin: !PA4 step_distance: .004242 +nozzle_diameter: 0.350 +filament_diameter: 1.750 max_velocity: 200000 max_accel: 3000 pressure_advance: 0.07 diff --git a/klippy/extruder.py b/klippy/extruder.py index 31f66cd6..23ed7f54 100644 --- a/klippy/extruder.py +++ b/klippy/extruder.py @@ -10,9 +10,11 @@ class PrinterExtruder: def __init__(self, printer, config): self.heater = heater.PrinterHeater(printer, config) self.stepper = stepper.PrinterStepper(printer, config, 'extruder') - self.pressure_advance = config.getfloat('pressure_advance', 0.) + nozzle_diameter = config.getfloat('nozzle_diameter') + filament_diameter = config.getfloat('filament_diameter') self.max_e_velocity = config.getfloat('max_velocity') self.max_e_accel = config.getfloat('max_accel') + self.pressure_advance = config.getfloat('pressure_advance', 0.) self.need_motor_enable = True self.extrude_pos = 0. def build_config(self):