Config, Lots of docs, Format

Added a config validator and documented code that was previously
undocumented, for the plot_generator scripts, documented them.
This commit is contained in:
2025-06-16 16:36:18 +02:00
parent 3a6cd6af3d
commit 7905cb851a
14 changed files with 436 additions and 89 deletions

View File

@@ -1,3 +1,4 @@
from kivy.base import Clock
from kivymd.app import MDApp
from kivymd.uix.button import MDFlatButton
from kivymd.uix.dialog import MDDialog
@@ -48,9 +49,7 @@ class HomeScreen(MDScreen):
text="Cancel",
on_release=lambda _: self.quit_dialog.dismiss(),
),
MDFlatButton(
text="Quit", on_release=lambda _: self._quit()
),
MDFlatButton(text="Quit", on_release=lambda _: self._quit()),
],
)
super().__init__(**kw)
@@ -59,9 +58,12 @@ class HomeScreen(MDScreen):
self._com.close()
MDApp.get_running_app().stop()
def start(self):
Clock.schedule_once(lambda _: self._start())
# Go to the main screen if we can establish connection or the check was disabled
# in the configs
def start(self):
def _start(self):
if self._com.connect():
self.manager.current = "main"
self.manager.transition.direction = "right"
@@ -94,7 +96,6 @@ class HomeScreen(MDScreen):
"13"
] = f"Incorrect permissions at {port}. Resolve by running 'sudo chmod 777 {port}'"
if port == "":
return information[operating_system]["NO_COM"]