optimierung
This commit is contained in:
22
main.py
22
main.py
@@ -469,27 +469,9 @@ class ArduinoGUI:
|
|||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
def lsp_communication_loop(self):
|
def lsp_communication_loop(self):
|
||||||
|
time.sleep(10)
|
||||||
while self.running:
|
while self.running:
|
||||||
if self.ser:
|
pass
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
def send_pid_parameters(self):
|
def send_pid_parameters(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user