Commit ce2714ea authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Renames webserver.py as mqtt_interface.py. Sets http_interface.py as default...

Renames webserver.py as mqtt_interface.py. Sets http_interface.py as default in config. Cleans commented lines...
Showing with 3 additions and 10 deletions
+3 -10
......@@ -20,7 +20,7 @@ OHMPI_CONFIG = {
CONTROL_CONFIG = {
'tcp_port': 5555,
'interface': 'mqtt_interface.py'
'interface': 'http_interface.py' # 'mqtt_interface'
}
# Execution logging configuration
EXEC_LOGGING_CONFIG = {
......
File moved
......@@ -14,11 +14,6 @@ def on_message(client, userdata, message):
socket.send(message.payload)
# Get the reply
# event = socket.poll(timeout=1000)
# if event == 0:
# print('timeout')
# reply = 'no reply...'
# else:
reply = socket.recv()
print(f'Received reply {message.payload.decode("utf-8")}: {reply}')
......
......@@ -656,9 +656,6 @@ class OhmPi(object):
self.exec_logger.debug(f'Start listening for commands on port {tcp_port}')
while self.cmd_listen:
try:
#id_sock = socket.recv()
#assert not socket.recv() # empty data here
#assert socket.recv() == id_sock
message = socket.recv(flags=zmq.NOBLOCK)
self.exec_logger.debug(f'Received command: {message}')
e = None
......@@ -673,6 +670,7 @@ class OhmPi(object):
if cmd is not None and cmd_id is not None:
if cmd == 'update_settings' and args is not None:
self._update_acquisition_settings(args)
status = True
elif cmd == 'start':
self.measure(cmd_id)
while not self.status == 'idle':
......
{
"nb_electrodes": 64,
"injection_duration":0.2,
"injection_duration": 0.2,
"nbr_meas": 1,
"sequence_delay": 1,
"nb_stack": 1,
......
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