maocypher / Octoprint-Smart-Filament-Sensor

OctoPrint plugin that lets integrate Smart Filament Sensors like BigTreeTechs SmartFilamentSensor directly to RaspberryPi GPIO pins.
GNU General Public License v3.0
13 stars 20 forks source link

Remove GPIO.cleanup() to support multi-instance #61

Open robolize opened 2 years ago

robolize commented 2 years ago

Please remove the call to "GPIO.cleanup()" in the initialization. With this line in the code, you cannot have more than one instance of the filament sensors functional at any time. I am running 2 printers from my octoprint setup. I could not get both to work until I commented out that line.
Also, this line is impacting other plugins which are trying to use the GPIO interface.

I was clued into this by an issue raised in another plugin here, https://github.com/kantlivelong/OctoPrint-PSUControl/issues/176