Skip to content
Snippets Groups Projects
Commit c76a54b9 authored by Michael D. M. Dryden's avatar Michael D. M. Dryden
Browse files

Fix experiment_process.py parameter sending protocol.

parent 0c2d6bcd
No related merge requests found
......@@ -123,22 +123,22 @@ class BaseExperimentProcess(ABC):
logger.warning("Expected RQP %s got: %s", n_params, reply)
continue
tries = 5
for i in params:
while True:
tries = 5
while tries:
self.serial.write(f"{i} ".encode('ascii'))
try:
reply = get_reply()
if reply == f"@RCVC {i}":
break
except serial.SerialException:
if tries <= 0:
elif reply == "@RCVE":
continue
except serial.SerialException:
tries -= 1
pass
else:
break
continue
else:
logger.error('Communication failure')
return False
return True
return False
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment