From 451cd9bc688ac8b7411add55e1e751c54dcab3ea Mon Sep 17 00:00:00 2001 From: Musab Erdem Date: Mon, 22 Jul 2024 11:55:41 +0200 Subject: [PATCH] Optimierung der LSP Schnittstelle --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 9de64f2..2630289 100644 --- a/main.py +++ b/main.py @@ -445,11 +445,11 @@ class ArduinoGUI: if self.ser.in_waiting: try: command = "" - command = self.ser.read_all().decode(errors='ignore').strip() + command = self.ser.read().decode(errors='ignore').strip() while self.ser.in_waiting: pass print(command) - if command[1] == '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':