Octoprint-Filament-Reloaded icon indicating copy to clipboard operation
Octoprint-Filament-Reloaded copied to clipboard

self.active is initialized in the wrong class.

Open sillyfunnypedro opened this issue 4 years ago • 1 comments

In the code that i added to deal with spurious GPIO call backs i added an initializer for self.active to the embedded class filamentStatusWatcher in line 26. self.active = 0

This initialization needs to be added to the class FilamentReloadedPlugin

I would suggest putting it at the end of the initialize function for the Class FilamentReloadedPlugin

Without this change i was getting an error when sensor_callback was called the first time. Initializing this variable correctly will fix this problem.

How to repo. start octoprint with the filament_reloaded running and watch the log.

How to know when the fix is done. The error is gone

sillyfunnypedro avatar Nov 09 '20 04:11 sillyfunnypedro

How uncanny! I fixed the error in the exact same line before reading this comment lol.

jouyang3 avatar Nov 09 '20 05:11 jouyang3