aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/hall_filament_width_sensor.py
diff options
context:
space:
mode:
authorSami Haahtinen <ressu@google.com>2023-12-16 01:03:51 +0000
committerKevinOConnor <kevin@koconnor.net>2023-12-17 11:13:33 -0500
commit3417940fd82adf621f429f42289d3693ee832582 (patch)
treee9f1cc9072cc333b2e3fe715cc7f60cc5c5024b8 /klippy/extras/hall_filament_width_sensor.py
parent2defd7374a8c7636e8fccaa1855eb8d75d7c070b (diff)
downloadkutter-3417940fd82adf621f429f42289d3693ee832582.tar.gz
kutter-3417940fd82adf621f429f42289d3693ee832582.tar.xz
kutter-3417940fd82adf621f429f42289d3693ee832582.zip
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>
Diffstat (limited to 'klippy/extras/hall_filament_width_sensor.py')
-rw-r--r--klippy/extras/hall_filament_width_sensor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/extras/hall_filament_width_sensor.py b/klippy/extras/hall_filament_width_sensor.py
index 276dd144..e0802887 100644
--- a/klippy/extras/hall_filament_width_sensor.py
+++ b/klippy/extras/hall_filament_width_sensor.py
@@ -30,7 +30,8 @@ class HallFilamentWidthSensor:
- self.measurement_max_difference)
self.diameter =self.nominal_filament_dia
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)
# Use the current diameter instead of nominal while the first
# measurement isn't in place
@@ -125,7 +126,7 @@ class HallFilamentWidthSensor:
self.update_filament_array(last_epos)
# Check runout
self.runout_helper.note_filament_present(
- self.diameter > self.runout_dia)
+ self.runout_dia_min <= self.diameter <= self.runout_dia_max)
# Does filament exists
if self.diameter > 0.5:
if len(self.filament_array) > 0: