From cebf8acda815082bf253a7e120b39c79dac6038f Mon Sep 17 00:00:00 2001
From: Guillaume <sagitta1618@gmail.com>
Date: Tue, 10 May 2022 18:54:34 +0200
Subject: [PATCH] update webserver

---
 install_local_mqtt_broker.sh | 0
 mqtt_controller.py           | 2 +-
 ohmpi.py                     | 3 ++-
 ohmpi_settings.json          | 2 +-
 webserver.py                 | 4 ++--
 5 files changed, 6 insertions(+), 5 deletions(-)
 mode change 100644 => 100755 install_local_mqtt_broker.sh

diff --git a/install_local_mqtt_broker.sh b/install_local_mqtt_broker.sh
old mode 100644
new mode 100755
diff --git a/mqtt_controller.py b/mqtt_controller.py
index df30e2a0..93abf662 100644
--- a/mqtt_controller.py
+++ b/mqtt_controller.py
@@ -15,7 +15,7 @@ publisher_config['topic'] = MQTT_CONTROL_CONFIG['ctrl_topic']
 publisher_config.pop('ctrl_topic')
 settings = {
             'injection_duration': 0.2,
-            'nbr_meas': 100,
+            'nbr_meas': 1,
             'sequence_delay': 1,
             'nb_stack': 1,
             'export_path': 'data/measurement.csv'
diff --git a/ohmpi.py b/ohmpi.py
index 64a8f465..3db2c402 100644
--- a/ohmpi.py
+++ b/ohmpi.py
@@ -810,8 +810,9 @@ print(current_time.strftime("%Y-%m-%d %H:%M:%S"))
 # for testing
 if __name__ == "__main__":
     # start interface
-    Popen(['python', CONTROL_CONFIG['interface']])
+    #Popen(['python', CONTROL_CONFIG['interface']])
 
     ohmpi = OhmPi(settings='ohmpi_settings.json')
     
+    
         
diff --git a/ohmpi_settings.json b/ohmpi_settings.json
index eea47405..273f2290 100644
--- a/ohmpi_settings.json
+++ b/ohmpi_settings.json
@@ -1,7 +1,7 @@
 {
     "nb_electrodes": 64,
     "injection_duration":0.2,
-    "nbr_meas": 100,
+    "nbr_meas": 1,
     "sequence_delay": 1,
     "nb_stack": 1,
     "export_path": "data/measurement.csv"
diff --git a/webserver.py b/webserver.py
index d925f579..f9d5dabc 100644
--- a/webserver.py
+++ b/webserver.py
@@ -18,8 +18,8 @@ serverPort = 8080
 
 # https://gist.github.com/MichaelCurrie/19394abc19abd0de4473b595c0e37a3a
 
-with open('ohmpi_param.json') as json_file:
-    pardict = json.load(json_file)
+#with open('ohmpi_settings.json') as json_file:
+#    pardict = json.load(json_file)
 
 #ohmpi = OhmPi(pardict, sequence='dd.txt')
 #ohmpi = OhmPi(pardict, sequence='dd16s0no8.txt')
-- 
GitLab