hall_filament_width_sensor: max filament diameter
Add support for maximum filament diameter to hall filament width sensor. If the diameter of the filament diameter is larger than the limit, the virtual runout sensor will trigger. The default value is set to maximum flow adjustment threshold to prevent oversized filament from clogging. Signed-off-by: Sami Haahtinen <ressu@ressukka.net>
This commit is contained in:
parent
2defd7374a
commit
3417940fd8
|
@ -8,6 +8,12 @@ All dates in this document are approximate.
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
20231216: The `[hall_filament_width_sensor]` is changed to trigger filament runout
|
||||||
|
when the thickness of the filament exceeds `max_diameter`. The maximum diameter
|
||||||
|
defaults to `default_nominal_filament_diameter + max_difference`. See
|
||||||
|
[[hall_filament_width_sensor] configuration
|
||||||
|
reference](./Config_Reference.md#hall_filament_width_sensor) for more details.
|
||||||
|
|
||||||
20231207: Several undocumented config parameters in the `[printer]`
|
20231207: Several undocumented config parameters in the `[printer]`
|
||||||
config section have been removed (the buffer_time_low,
|
config section have been removed (the buffer_time_low,
|
||||||
buffer_time_high, buffer_time_start, and move_flush_time parameters).
|
buffer_time_high, buffer_time_start, and move_flush_time parameters).
|
||||||
|
|
|
@ -4429,6 +4429,9 @@ adc2:
|
||||||
# command.
|
# command.
|
||||||
#min_diameter: 1.0
|
#min_diameter: 1.0
|
||||||
# Minimal diameter for trigger virtual filament_switch_sensor.
|
# Minimal diameter for trigger virtual filament_switch_sensor.
|
||||||
|
#max_diameter:
|
||||||
|
# Maximum diameter for triggering virtual filament_switch_sensor.
|
||||||
|
# The default is default_nominal_filament_diameter + max_difference.
|
||||||
#use_current_dia_while_delay: False
|
#use_current_dia_while_delay: False
|
||||||
# Use the current diameter instead of the nominal diameter while
|
# Use the current diameter instead of the nominal diameter while
|
||||||
# the measurement delay has not run through.
|
# the measurement delay has not run through.
|
||||||
|
|
|
@ -30,7 +30,8 @@ class HallFilamentWidthSensor:
|
||||||
- self.measurement_max_difference)
|
- self.measurement_max_difference)
|
||||||
self.diameter =self.nominal_filament_dia
|
self.diameter =self.nominal_filament_dia
|
||||||
self.is_active =config.getboolean('enable', False)
|
self.is_active =config.getboolean('enable', False)
|
||||||
self.runout_dia=config.getfloat('min_diameter', 1.0)
|
self.runout_dia_min=config.getfloat('min_diameter', 1.0)
|
||||||
|
self.runout_dia_max=config.getfloat('max_diameter', self.max_diameter)
|
||||||
self.is_log =config.getboolean('logging', False)
|
self.is_log =config.getboolean('logging', False)
|
||||||
# Use the current diameter instead of nominal while the first
|
# Use the current diameter instead of nominal while the first
|
||||||
# measurement isn't in place
|
# measurement isn't in place
|
||||||
|
@ -125,7 +126,7 @@ class HallFilamentWidthSensor:
|
||||||
self.update_filament_array(last_epos)
|
self.update_filament_array(last_epos)
|
||||||
# Check runout
|
# Check runout
|
||||||
self.runout_helper.note_filament_present(
|
self.runout_helper.note_filament_present(
|
||||||
self.diameter > self.runout_dia)
|
self.runout_dia_min <= self.diameter <= self.runout_dia_max)
|
||||||
# Does filament exists
|
# Does filament exists
|
||||||
if self.diameter > 0.5:
|
if self.diameter > 0.5:
|
||||||
if len(self.filament_array) > 0:
|
if len(self.filament_array) > 0:
|
||||||
|
|
Loading…
Reference in New Issue