hall_filament_width_sensor: Fix whitespace errors

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-06-06 14:52:56 -04:00
parent 739e6e7396
commit 12e3b9fa7b
1 changed files with 4 additions and 3 deletions

View File

@ -31,8 +31,10 @@ class HallFilamentWidthSensor:
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=config.getfloat('min_diameter', 1.0)
# Use the current diameter instead of nominal while the first measurement isn't in place # Use the current diameter instead of nominal while the first
self.use_current_dia_while_delay = config.getboolean('use_current_dia_while_delay', False) # measurement isn't in place
self.use_current_dia_while_delay = config.getboolean(
'use_current_dia_while_delay', False)
# filament array [position, filamentWidth] # filament array [position, filamentWidth]
self.filament_array = [] self.filament_array = []
self.lastFilamentWidthReading = 0 self.lastFilamentWidthReading = 0
@ -122,7 +124,6 @@ class HallFilamentWidthSensor:
filament_width = self.diameter filament_width = self.diameter
else: else:
filament_width = self.nominal_filament_dia filament_width = self.nominal_filament_dia
if ((filament_width <= self.max_diameter) if ((filament_width <= self.max_diameter)
and (filament_width >= self.min_diameter)): and (filament_width >= self.min_diameter)):
percentage = round(self.nominal_filament_dia**2 percentage = round(self.nominal_filament_dia**2