hall_filament_width_sensor: fix range check error (#4113)

Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
This commit is contained in:
Denis Ignatenko 2021-03-27 18:53:40 +02:00 committed by GitHub
parent 00f8262e57
commit cc31810fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ class HallFilamentWidthSensor:
self.runout_helper.note_filament_present( self.runout_helper.note_filament_present(
self.diameter > self.runout_dia) self.diameter > self.runout_dia)
# Does filament exists # Does filament exists
if self.lastFilamentWidthReading > 0.5: if self.diameter > 0.5:
if len(self.filament_array) > 0: if len(self.filament_array) > 0:
# Get first position in filament array # Get first position in filament array
pending_position = self.filament_array[0][0] pending_position = self.filament_array[0][0]
@ -160,7 +160,7 @@ class HallFilamentWidthSensor:
def cmd_M407(self, gcmd): def cmd_M407(self, gcmd):
response = "" response = ""
if self.lastFilamentWidthReading > 0: if self.diameter > 0:
response += ("Filament dia (measured mm): " response += ("Filament dia (measured mm): "
+ str(self.diameter)) + str(self.diameter))
else: else: