feature_lsp_com #8

Merged
musabe24 merged 17 commits from feature_lsp_com into main 2024-07-18 12:26:59 +02:00
Showing only changes of commit c8d8118d98 - Show all commits

View File

@@ -242,7 +242,7 @@ class ArduinoGUI:
com_port = self.combobox_value.get() com_port = self.combobox_value.get()
if com_port: if com_port:
try: try:
self.arduino = serial.Serial(com_port, 19200, timeout=1) self.arduino = serial.Serial(com_port, 19200, timeout=2)
messagebox.showinfo("Info", "Arduino verbunden an " + com_port) messagebox.showinfo("Info", "Arduino verbunden an " + com_port)
except Exception as e: except Exception as e:
messagebox.showerror("Fehler", str(e)) messagebox.showerror("Fehler", str(e))
@@ -454,8 +454,6 @@ class ArduinoGUI:
message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n" message = f"{self.current_angle};{self.current_torque};{self.analogInput};{self.currentSetpoint};{self.currentOutput}\n"
self.ser.write(message.encode()) self.ser.write(message.encode())
time.sleep(0.1) time.sleep(0.1)
while self.ser.out_waiting:
pass
except Exception as e: except Exception as e:
print(e) print(e)
#self.ser.write(b'Hallo\n') #self.ser.write(b'Hallo\n')