mirror of
https://github.com/markqvist/Sideband.git
synced 2024-12-24 15:09:24 -05:00
Added dialog displaying RNode hardware errors on startup
This commit is contained in:
parent
04f26343db
commit
2cdc2bfb58
@ -1,4 +1,5 @@
|
||||
__debug_build__ = False
|
||||
# TODO: Reset
|
||||
__debug_build__ = True
|
||||
__disable_shaders__ = True
|
||||
__version__ = "0.2.6"
|
||||
__variant__ = "beta"
|
||||
@ -187,6 +188,27 @@ class SidebandApp(MDApp):
|
||||
self.app_state = SidebandApp.ACTIVE
|
||||
self.loading_updater.cancel()
|
||||
|
||||
def check_errors(dt):
|
||||
if self.sideband.getpersistent("startup.errors.rnode") != None:
|
||||
description = self.sideband.getpersistent("startup.errors.rnode")["description"]
|
||||
self.sideband.setpersistent("startup.errors.rnode", None)
|
||||
yes_button = MDRectangleFlatButton(
|
||||
text="OK",
|
||||
font_size=dp(18),
|
||||
)
|
||||
self.hw_error_dialog = MDDialog(
|
||||
title="Hardware Error",
|
||||
text="When starting a connected RNode, Reticulum reported the following error:\n\n[i]"+description+"[/i]",
|
||||
buttons=[ yes_button ],
|
||||
# elevation=0,
|
||||
)
|
||||
def dl_yes(s):
|
||||
self.hw_error_dialog.dismiss()
|
||||
yes_button.bind(on_release=dl_yes)
|
||||
self.hw_error_dialog.open()
|
||||
|
||||
Clock.schedule_once(check_errors, 1.5)
|
||||
|
||||
|
||||
#################################################
|
||||
# General helpers #
|
||||
|
Loading…
Reference in New Issue
Block a user