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

Filament Status Indicator

Open jouyang3 opened this issue 4 years ago • 0 comments

I am testing the icon indicator in OctoPrint of this plugin. I can read from octoprint.log that the icon is refreshing in interval by changing the DEBUG lines to info in __init__ of updateIcon():

        def updateIcon(self):
            if self.wCurrentState==0:
                self._logger.info("Thread: Update icon 0")
                self.wPluginManager.send_plugin_message(self.wIdentifier, dict(filamentStatus="empty"))
            elif self.wCurrentState==1:
                self._logger.info("Thread: Update icon 1")
                self.wPluginManager.send_plugin_message(self.wIdentifier, dict(filamentStatus="present"))
            elif self.wCurrentState==-1:
                self._logger.info("Thread: Update icon 2")
                self.wPluginManager.send_plugin_message(self.wIdentifier, dict(filamentStatus="unknown"))

The switching is fully functional as indicated in octoprint.log. However, the icon in the navbar in the homepage is not refreshing despite the correct printout atop the send_plugin_message lines are being executed. Can anyone help? I don't know how messages are passed around for a plugin.

Many thanks!

jouyang3 avatar Nov 09 '20 05:11 jouyang3