From 945e088667ec6e10ba6615763876bad3a3d51766 Mon Sep 17 00:00:00 2001 From: Musab Erdem Date: Mon, 22 Jul 2024 11:45:38 +0200 Subject: [PATCH] Optimierung der LSP Schnittstelle --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index ceb1cbd..01f190f 100644 --- a/main.py +++ b/main.py @@ -446,12 +446,12 @@ class ArduinoGUI: try: command = self.ser.read_all().decode(errors='ignore').strip() 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" self.ser.write(message.encode()) - if command(0) == 'w': + if command[0] == 'w': self.tare_angle() - if command(0) == 'u': + if command[0] == 'u': time.sleep(5) outCommand = F"{command}\n" self.arduino.write(outCommand.encode())