Optimierung der LSP Schnittstelle
This commit is contained in:
6
main.py
6
main.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user