From cec1d3cbda46ff092b50abfc75c59dd802c4b0a6 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sun, 3 May 2020 19:39:40 +0200 Subject: [PATCH] [modules/octoprint] small refactoring see PR #621 --- modules/contrib/octoprint.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/contrib/octoprint.py b/modules/contrib/octoprint.py index 6cd110b..703a93d 100644 --- a/modules/contrib/octoprint.py +++ b/modules/contrib/octoprint.py @@ -77,8 +77,6 @@ class Module(core.module.Module): self.__printer_bed_temperature = "-" self.__tool1_temperature = "-" - self.update_status() - core.input.register(self, button=core.input.LEFT_MOUSE, cmd=self.__show_popup) def octoprint_status(self, widget): @@ -134,7 +132,7 @@ class Module(core.module.Module): tool_id += 1 return tool_temperatures - def update_status(self): + def update(self): try: self.__octoprint_state = self.__get_octoprint_state() @@ -250,11 +248,4 @@ class Module(core.module.Module): self.__webcam_images_queue = None self.__webcam_images_worker.stop() - def update(self): - self.update_status() - - def state(self, widget): - return [] - - # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4