Optimierung der LSP Schnittstelle

This commit is contained in:
2024-07-22 11:09:36 +02:00
parent a099481b3e
commit 74c7746142
4 changed files with 884 additions and 9 deletions

View File

@@ -449,8 +449,6 @@ class ArduinoGUI:
if command == 'a':
message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n"
self.ser.write(message.encode())
while self.ser.out_waiting:
pass
if command == 'w':
self.tare_angle()
if command == 'u':
@@ -459,7 +457,9 @@ class ArduinoGUI:
outCommand = F"u{string}u\n"
self.arduino.write(outCommand.encode())
time.sleep(0.1)
while self.ser.out_waiting:
pass
self.ser.read_all()
except Exception as e:
print(e)