LSP Kommunikation optimiert

This commit is contained in:
2024-07-18 11:51:09 +02:00
parent ffce232d47
commit a099481b3e

View File

@@ -451,6 +451,15 @@ class ArduinoGUI:
self.ser.write(message.encode()) self.ser.write(message.encode())
while self.ser.out_waiting: while self.ser.out_waiting:
pass pass
if command == 'w':
self.tare_angle()
if command == 'u':
time.sleep(5)
string = self.ser.read_until(b"u")
outCommand = F"u{string}u\n"
self.arduino.write(outCommand.encode())
time.sleep(0.1)
self.ser.read_all() self.ser.read_all()
except Exception as e: except Exception as e:
print(e) print(e)