+ get battery & exception handler

This commit is contained in:
elias 2025-04-03 12:32:06 +02:00
parent 2271236a31
commit 9047f69296

View File

@ -62,7 +62,6 @@ class RobomasterUI:
ttk.Button(gripper_frame, text="Open Gripper", command=self.open_gripper).grid(row=1, column=0, columnspan=2, pady=5, sticky="we")
ttk.Button(gripper_frame, text="Close Gripper", command=self.close_gripper).grid(row=2, column=0, columnspan=2, pady=5, sticky="we")
ttk.Button(gripper_frame, text="Gripper Status", command=self.get_gripper_status).grid(row=3, column=0, columnspan=2, pady=5, sticky="we")
ttk.Button(master, text="Get Battery", command=self.get_battery).grid(row=1, column=0, padx=10, pady=0, sticky="we")
led_frame = ttk.LabelFrame(master, text="LED Control")
led_frame.grid(row=0, column=2, padx=10, pady=10, sticky="n")
@ -95,9 +94,10 @@ class RobomasterUI:
self.b_entry.grid(row=4, column=1, padx=5, pady=5)
ttk.Button(led_frame, text="Set LED", command=self.led_control_ui).grid(row=5, column=0, columnspan=2, pady=5, sticky="we")
ttk.Button(master, text="Get Battery", command=self.get_battery).grid(row=1, column=2, padx=0, pady=0, sticky="n")
chassis_frame = ttk.LabelFrame(master, text="Chassis Control (WASDQE)")
chassis_frame.grid(row=2, column=0, columnspan=3, padx=10, pady=10, sticky="n")
chassis_frame.grid(row=1, column=0, columnspan=3, padx=10, pady=10, sticky="n")
tk.Label(chassis_frame, text="XY Speed (m/s):", fg='white', bg='#121212').grid(row=0, column=0, padx=5, pady=5, sticky="e")
self.chassis_x_speed_entry = tk.Entry(chassis_frame, width=5, fg='white', bg='#333333', insertbackground='white')