move start of repeatedtimer to after initalized

This commit is contained in:
Franzi 2019-01-27 10:35:50 +01:00
parent 55fe6816f6
commit 4dbc988166

View file

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