From 87d012086be43700695e6ed7260b12ab20f9e327 Mon Sep 17 00:00:00 2001 From: Musab Erdem Date: Thu, 18 Jul 2024 10:36:56 +0200 Subject: [PATCH] optimierung --- main.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/main.py b/main.py index 4ac2446..0931d62 100644 --- a/main.py +++ b/main.py @@ -44,8 +44,6 @@ class ArduinoGUI: self.load_configurations() # Start the communication thread - self.lsp_communication_tread = threading.Thread(target=self.lsp_communication_loop) - self.lsp_communication_tread.start() self.communication_thread = threading.Thread(target=self.communication_loop) self.communication_thread.start() @@ -275,7 +273,7 @@ class ArduinoGUI: pass if serPort != None: - self.ser = serial.Serial(serPort, 19200, timeout=1) + self.ser = serial.Serial(serPort, 9600, timeout=1) print(F"Slave Port bereit an {serPort}") except Exception as e: print(F"Fehler beim Öffnen des Slave Ports an {serPort}") @@ -439,8 +437,6 @@ class ArduinoGUI: self.csv_writer.writerow([formatted_time, formatted_angle, formatted_setpoint, formatted_torque, formatted_output]) - - except Exception as e: print(e) @@ -466,12 +462,6 @@ class ArduinoGUI: time.sleep(0.1) - def lsp_communication_loop(self): - time.sleep(10) - while self.running: - pass - - def send_pid_parameters(self): if self.selected_pid in self.pid_params: pid_values = self.pid_params[self.selected_pid]