move start of repeatedtimer to after initalized

master
Franzi 4 years ago
parent 55fe6816f6
commit 4dbc988166

@ -46,9 +46,6 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin,
self._lcd_updating = False
timer = RepeatedTimer(30, self._lcd_update())
timer.start()
def on_settings_initialized(self):
self._initialize_lcd()
self._printer.register_callback(self)
@ -109,7 +106,8 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin,
self._line1 = printerstate.center(20)
self.clear_lower_half()
self._lcd_update()
timer = RepeatedTimer(30, self._lcd_update())
timer.start()
def _lcd_update(self):
if self._lcd_updating:

Loading…
Cancel
Save