diff --git a/diagnostics/hub_diagnostics.py b/diagnostics/hub_diagnostics.py index e83335d..d04e5aa 100644 --- a/diagnostics/hub_diagnostics.py +++ b/diagnostics/hub_diagnostics.py @@ -3,6 +3,7 @@ from pybricks import version import other_functions as debug from micropython_diagnostics import MicroPythonDiagnostics from pybricks.parameters import Port +from os_diagnostics import OSDiagnostics class HubDiagnostics: def __init__(self, hub): self.hub = hub @@ -29,13 +30,18 @@ class HubDiagnostics: v = verbose debug.log("[Hub Diagnostics] Starting hub diagnostics...", v) while True: - choice = input("[Hub Diagnostics] Which hub diagnostic would you like to run?\n[Hub Diagnostics] Enter 'l' for light source test\n[Hub Diagnostics] Enter 'm' for MicroPython diagnostics\n[Hub Diagnostics] Enter 'q' to quit\n[Hub Diagnostics] Your choice: ").strip().lower() + choice = input("[Hub Diagnostics] Which hub diagnostic would you like to run?\n[Hub Diagnostics] Enter 'l' for light source test\n[Hub Diagnostics] Enter 'm' for MicroPython diagnostics\n[Hub Diagnostics] Enter 'o' for operating system diagnostics\n[Hub Diagnostics] Enter 'q' to quit\n[Hub Diagnostics] Your choice: ").strip().lower() if choice == "l": debug.log("[Hub Diagnostics] Running light source test...", v) self.testLightSources(v) if choice == "m": debug.log("[Hub Diagnostics] Running MicroPython diagnostics...", v) MicroPythonDiagnostics.printAll() + if choice == "o" + debug.log("[Hub Diagnostics] Running OS diagnostics...", v) + diag = OSDiagnostics(hub=PrimeHub(), motorclass=Motor) + diag.printAll() + if choice == "q": print("[Hub Diagnostics] Hub diagnostics completed.") return \ No newline at end of file