dev #14

Merged
Arcmyx merged 4 commits from dev into main 2026-01-09 19:21:14 +00:00
Showing only changes of commit 517d6a3e91 - Show all commits

View File

@@ -7,13 +7,9 @@ HUB = PrimeHub()
from BatteryDiagnostics import BatteryDiagnostics from BatteryDiagnostics import BatteryDiagnostics
from MotorDiagnostics import MotorDiagnostics from MotorDiagnostics import MotorDiagnostics
from ColorSensorDiagnostics import ColorSensorDiagnostics from ColorSensorDiagnostics import ColorSensorDiagnostics
from DriveBaseDiagnostics import DriveBaseDiagnostics
from HubDiagnostics import HubDiagnostics
battery = BatteryDiagnostics(HUB) battery = BatteryDiagnostics(HUB)
motor = MotorDiagnostics(HUB, Motor) motor = MotorDiagnostics(HUB, Motor)
colorsensor = ColorSensorDiagnostics(HUB, ColorSensor) colorsensor = ColorSensorDiagnostics(HUB, ColorSensor)
hubdiags = HubDiagnostics(HUB)
drivebase = DriveBaseDiagnostics(HUB, Motor, DriveBase)
CLEARCONFIRM = input("Clear the console before proceeding? Y/N (default: yes): ") CLEARCONFIRM = input("Clear the console before proceeding? Y/N (default: yes): ")
if(CLEARCONFIRM == "Y" or CLEARCONFIRM == "y" or CLEARCONFIRM == "yes" or CLEARCONFIRM == ""): if(CLEARCONFIRM == "Y" or CLEARCONFIRM == "y" or CLEARCONFIRM == "yes" or CLEARCONFIRM == ""):
print("Clearing console... \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n") print("Clearing console... \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
@@ -27,9 +23,8 @@ print("""
█████ █████ █████ ▒▒█████ █████ █████ █████ █████ █████ ▒▒█████████ ▒▒█████████ █████ █████ █████ ▒▒█████ █████ █████ █████ █████ █████ ▒▒█████████ ▒▒█████████
▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
The free and open source diagnostics tool for the LEGO® Education SPIKE™ Prime robots, designed for FIRST Lego League. The free and open source diagnostics tool for LEGO® Education SPIKE™ Prime robots, designed for FIRST Lego League.
Developed by Team 65266, Lego Dynamics. Developed by Team 65266, Lego Dynamics.
Please set your window size to 90% on small screens for best results with the ASCII art.
""" """
) )
while True: while True:
@@ -38,8 +33,6 @@ while True:
print("Enter 'b' for battery diagnostics") print("Enter 'b' for battery diagnostics")
print("Enter 'm' for motor diagnostics") print("Enter 'm' for motor diagnostics")
print("Enter 'cs' for color sensor diagnostics") print("Enter 'cs' for color sensor diagnostics")
print("Enter 'h' for hub diagnostics")
print("Enter 'db' for drive base diagnostics")
print("Enter 'q' to quit") print("Enter 'q' to quit")
choice = input("Your choice: ").strip().lower() choice = input("Your choice: ").strip().lower()
@@ -55,20 +48,13 @@ while True:
print("------------------------MOTOR DIAGNOSTICS------------------------") print("------------------------MOTOR DIAGNOSTICS------------------------")
motor.fullTest() motor.fullTest()
print("Motor diagnostics completed.") print("Motor diagnostics completed.")
elif choice == "h":
print("-------------------------HUB DIAGNOSTICS-------------------------")
hubdiags.printAll()
print("Hub diagnostics completed.")
elif choice == "q": elif choice == "q":
print("Diagnostics completed successfully. Exiting with code 0. Good luck in the robot game!") print("Diagnostics completed successfully. Exiting program.")
break break
elif choice == "db":
print("----------------------DRIVEBASE DIAGNOSTICS----------------------")
drivebase.printAll()
elif choice == "cs": elif choice == "cs":
print("---------------------COLOR SENSOR DIAGNOSTICS---------------------") print("---------------------COLOR SENSOR DIAGNOSTICS---------------------")
colorsensor.printAll() colorsensor.printAll()
print("Color sensor diagnostics completed.") print("Color sensor diagnostics completed.")
else: else:
print("Invalid choice. Please enter 'b', 'm', or 'q'.") print("Invalid choice. Please enter 'b', 'm', or 'q'.")