LSP Kommunikation optimiert
This commit is contained in:
9
main.py
9
main.py
@@ -451,6 +451,15 @@ class ArduinoGUI:
|
||||
self.ser.write(message.encode())
|
||||
while self.ser.out_waiting:
|
||||
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()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
Reference in New Issue
Block a user