hall_filament_width_sensor: Fix race condition (#3790)
Fix race condition of filament width sensor Added fix to similar code of TSL1401CL filament width sensor Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
This commit is contained in:
parent
8cc1d84180
commit
1e2eb9a4de
|
@ -152,7 +152,11 @@ class HallFilamentWidthSensor:
|
||||||
else:
|
else:
|
||||||
self.gcode.run_script("M221 S100")
|
self.gcode.run_script("M221 S100")
|
||||||
self.filament_array = []
|
self.filament_array = []
|
||||||
return eventtime + 1
|
|
||||||
|
if self.is_active:
|
||||||
|
return eventtime + 1
|
||||||
|
else:
|
||||||
|
return self.reactor.NEVER
|
||||||
|
|
||||||
def cmd_M407(self, gcmd):
|
def cmd_M407(self, gcmd):
|
||||||
response = ""
|
response = ""
|
||||||
|
|
|
@ -101,7 +101,11 @@ class FilamentWidthSensor:
|
||||||
else:
|
else:
|
||||||
self.gcode.run_script("M221 S100")
|
self.gcode.run_script("M221 S100")
|
||||||
self.filament_array = []
|
self.filament_array = []
|
||||||
return eventtime + 1
|
|
||||||
|
if self.is_active:
|
||||||
|
return eventtime + 1
|
||||||
|
else:
|
||||||
|
return self.reactor.NEVER
|
||||||
|
|
||||||
def cmd_M407(self, gcmd):
|
def cmd_M407(self, gcmd):
|
||||||
response = ""
|
response = ""
|
||||||
|
|
Loading…
Reference in New Issue