diff --git a/klippy/extras/tsl1401cl_filament_width_sensor.py b/klippy/extras/tsl1401cl_filament_width_sensor.py index a564ddb0..c9f5ab17 100644 --- a/klippy/extras/tsl1401cl_filament_width_sensor.py +++ b/klippy/extras/tsl1401cl_filament_width_sensor.py @@ -93,8 +93,8 @@ class FilamentWidthSensor: filament_width = item[1] if ((filament_width <= self.max_diameter) and (filament_width >= self.min_diameter)): - percentage = round(self.nominal_filament_dia - / filament_width * 100) + percentage = round(self.nominal_filament_dia**2 + / filament_width**2 * 100) self.gcode.run_script("M221 S" + str(percentage)) else: self.gcode.run_script("M221 S100")