update_ui on client connection and page refresh.

This to avoid wrong gpio status after page refresh.
This commit is contained in:
Arti4ever
2019-03-02 15:37:38 +01:00
parent 6b748e5e41
commit 7fa53827fd

View File

@@ -1253,6 +1253,9 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin,
if event == Events.CONNECTED:
self.update_ui()
if event == Events.CLIENT_OPENED:
self.update_ui()
if event == Events.PRINT_RESUMED:
self.start_filament_detection()
@@ -1707,4 +1710,3 @@ def __plugin_load__():
"octoprint.comm.protocol.gcode.queuing": __plugin_implementation__.hook_gcode_queuing,
"octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information
}