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 4b093e86de - Show all commits

22
main.py
View File

@@ -469,27 +469,9 @@ class ArduinoGUI:
time.sleep(0.1)
def lsp_communication_loop(self):
time.sleep(10)
while self.running:
if self.ser:
if self.ser.in_waiting:
try:
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"
self.ser.write(message.encode())
time.sleep(0.1)
while self.ser.out_waiting:
pass
except Exception as e:
print(e)
#self.ser.write(b'Hallo\n')
else :
try:
pass
self.connect_lsp()
except Exception as e:
print(e)
pass
def send_pid_parameters(self):