From c29fd71ccc7d96f4b7e819953d8aa38dfc59507e Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Thu, 27 Oct 2022 18:05:01 +0200
Subject: [PATCH] Implements set_sequence command

---
 .gitignore | 1 +
 ohmpi.py   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 411f6587..d70443a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ Ohmpi_4elec_mqtt.py
 ohmpy/*
 logs/*
 sequence.txt
+/Proposition interface.odp
diff --git a/ohmpi.py b/ohmpi.py
index ea73fa34..82930952 100644
--- a/ohmpi.py
+++ b/ohmpi.py
@@ -13,6 +13,7 @@ import json
 import numpy as np
 import csv
 import time
+from io import StringIO
 import zmq
 from datetime import datetime
 from termcolor import colored
@@ -673,8 +674,7 @@ class OhmPi(object):
                             self._update_acquisition_settings(args)
                             status = True
                         elif cmd == 'set_sequence' and args is not None:
-                            self.sequence = np.array_str
-                            self._update_acquisition_settings(args)
+                            self.sequence = np.loadtxt(StringIO(args))
                             status = True
                         elif cmd == 'start':
                             self.measure(cmd_id)
-- 
GitLab