We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 867f920 commit 30a3084Copy full SHA for 30a3084
octoprint_filamentreload/__init__.py
@@ -45,6 +45,10 @@ def after_resume_gcode(self):
45
46
def on_after_startup(self):
47
self._logger.info("Filament Sensor Reloaded started")
48
+ if self.mode == 0:
49
+ GPIO.setmode(GPIO.BOARD)
50
+ else:
51
+ GPIO.setmode(GPIO.BCM)
52
if self.sensor_enabled():
53
self._logger.info("Filament Sensor active on GPIO Pin [%s]"%self.pin)
54
GPIO.setup(self.pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Initialize GPIO as INPUT
0 commit comments