feature_lsp_com #9

Merged
musabe24 merged 12 commits from feature_lsp_com into main 2024-07-22 12:15:27 +02:00
Showing only changes of commit 945e088667 - Show all commits

View File

@@ -446,12 +446,12 @@ class ArduinoGUI:
try: try:
command = self.ser.read_all().decode(errors='ignore').strip() command = self.ser.read_all().decode(errors='ignore').strip()
print(command) print(command)
if command(0) == 'a': if command[0] == 'a':
message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n" message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n"
self.ser.write(message.encode()) self.ser.write(message.encode())
if command(0) == 'w': if command[0] == 'w':
self.tare_angle() self.tare_angle()
if command(0) == 'u': if command[0] == 'u':
time.sleep(5) time.sleep(5)
outCommand = F"{command}\n" outCommand = F"{command}\n"
self.arduino.write(outCommand.encode()) self.arduino.write(outCommand.encode())