Commit 0a785033 authored by rpi2.0's avatar rpi2.0
Browse files

Fixes issue on play and stop buttons on http interface

Showing with 10 additions and 9 deletions
+10 -9
......@@ -21,10 +21,10 @@ OHMPI_CONFIG = {
'board_version': '22.10'
} # TODO: add a dictionary with INA models and associated gain values
# CONTROL_CONFIG = {
# 'tcp_port': 5555,
# 'interface': 'mqtt_interface.py' # 'http_interface'
# }
CONTROL_CONFIG = {
'tcp_port': 5555,
'interface': 'mqtt_interface.py' # 'http_interface'
}
# Execution logging configuration
EXEC_LOGGING_CONFIG = {
'logging_level': logging.DEBUG,
......
......@@ -16,8 +16,10 @@ k.sequence = np.array([[1,2,3,4]]) # set numpy array of shape (n,4)
# k.load_sequence('ABMN.txt') # load sequence from a local file
### Run contact resistance check
k.rs_check()
# k.rs_check()
### Run sequence
k.run_sequence()
# k.interrupt()
\ No newline at end of file
k.run_sequence()
# k.run_sequence_async()
# time.sleep(2)
# k.interrupt()
\ No newline at end of file
......@@ -95,7 +95,6 @@ class MyServer(SimpleHTTPRequestHandler):
payload = json.dumps({'cmd_id': cmd_id, 'cmd': 'run_sequence'})
publish.single(payload=payload, **publisher_config)
elif dic['cmd'] == 'interrupt':
# ohmpi.stop()
payload = json.dumps({'cmd_id': cmd_id, 'cmd': 'interrupt'})
publish.single(payload=payload, **publisher_config)
elif dic['cmd'] == 'getData':
......
......@@ -1013,7 +1013,7 @@ class OhmPi(object):
self.exec_logger.warning(f'Unable to set sequence: {e}')
status = False
elif cmd == 'run_sequence':
self.run_sequence(cmd_id)
self.run_sequence_async(cmd_id)
while not self.status == 'idle':
time.sleep(0.1)
status = True
......
Supports Markdown
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