lsp kommunikation optimierung

This commit is contained in:
2024-07-18 10:04:00 +02:00
parent deb7f54bfb
commit 8686a8ef19

View File

@@ -272,7 +272,7 @@ class ArduinoGUI:
serPort = port
if serPort != None:
self.ser = serial.Serial(serPort, 19200, timeout=1)
self.ser = serial.Serial(serPort, 19200, timeout=1, parity=serial.PARITY_EVEN, stopbits=serial.STOPBITS_TWO)
print(F"Slave Port bereit an {serPort}")
except Exception as e:
print(F"Fehler beim Öffnen des Slave Ports an {serPort}")
@@ -447,7 +447,7 @@ class ArduinoGUI:
if self.ser:
if self.ser.in_waiting:
try:
command = self.ser.readline().decode(errors='ignore')
command = self.ser.readline().decode(errors='ignore').strip()
print(command)
if command == 'a':
message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n"