Skip to content

Commit 38e5527

Browse files
authored
Merge pull request kontakt#9 from micdenny/patch-1
fix condition pin is defined
2 parents 0a4f017 + b4c3598 commit 38e5527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

octoprint_filamentreload/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def on_after_startup(self):
2424
self.bounce = int(self._settings.get(["bounce"]))
2525
self.switch = int(self._settings.get(["switch"]))
2626

27-
if self._settings.get(["pin"]) != -1: # If a pin is defined
27+
if self._settings.get(["pin"]) != "-1": # If a pin is defined
2828
self._logger.info("Filament Sensor active on GPIO Pin [%s]"%self.pin)
2929
GPIO.setup(self.pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Initialize GPIO as INPUT
3030

0 commit comments

Comments
 (0)