forked from CreatBot/CreatBotKlipperScreen
Splash_screen: fix return and duplicated power devices
fix forcefully returning the user from menu to splash when there is no connection to moonraker/klipper fix a case where the power device was added multiple times to the list
This commit is contained in:
@@ -68,16 +68,17 @@ class KlippyWebsocket(threading.Thread):
|
||||
state = self._screen.apiclient.get_server_info()
|
||||
if state is False:
|
||||
if self.reconnect_count > 3:
|
||||
self._screen.printer_initializing(_("Cannot connect to Moonraker") +
|
||||
("\n\n%s\n\n") % self._url +
|
||||
_("Retry #%s") % self.reconnect_count)
|
||||
|
||||
self._screen.panels['splash_screen'].update_text(
|
||||
_("Cannot connect to Moonraker") +
|
||||
("\n\n%s\n\n") % self._url +
|
||||
_("Retry #%s") % self.reconnect_count)
|
||||
return False
|
||||
if state['result']['klippy_connected'] is False:
|
||||
if self.reconnect_count > 3:
|
||||
self._screen.printer_initializing(_("Moonraker: connected") +
|
||||
("\n\nKlipper: %s\n\n") % state['result']['klippy_state'] +
|
||||
_("Retry #%s") % self.reconnect_count)
|
||||
self._screen.panels['splash_screen'].update_text(
|
||||
_("Moonraker: connected") +
|
||||
("\n\nKlipper: %s\n\n") % state['result']['klippy_state'] +
|
||||
_("Retry #%s") % self.reconnect_count)
|
||||
return False
|
||||
printer_info = self._screen.apiclient.get_printer_info()
|
||||
if printer_info is False:
|
||||
|
Reference in New Issue
Block a user