From 0bc81cb21b6f39bd63d34aeb565ab9677f19a11c Mon Sep 17 00:00:00 2001
From: Arnaud Watlet <arnaud.watlet@umons.ac.be>
Date: Mon, 11 Dec 2023 14:55:42 +0100
Subject: [PATCH] Adds progress bar in run_sequence

---
 ohmpi/ohmpi.py   | 3 ++-
 requirements.txt | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py
index 63f20334..e717483b 100644
--- a/ohmpi/ohmpi.py
+++ b/ohmpi/ohmpi.py
@@ -28,6 +28,7 @@ from ohmpi.logging_setup import setup_loggers
 from ohmpi.config import MQTT_CONTROL_CONFIG, OHMPI_CONFIG, EXEC_LOGGING_CONFIG
 import ohmpi.deprecated as deprecated
 from ohmpi.hardware_system import OhmPiHardware
+import tqdm
 
 # finish import (done only when class is instantiated as some libs are only available on arm64 platform)
 try:
@@ -708,7 +709,7 @@ class OhmPi(object):
             n = 1
         else:
             n = self.sequence.shape[0]
-        for i in range(0, n):
+        for i in tqdm(range(0, n), "Sequence progress:":
             if self.sequence is None:
                 quad = np.array([0, 0, 0, 0])
             else:
diff --git a/requirements.txt b/requirements.txt
index 4c649e24..4ad48304 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -10,4 +10,5 @@ numpy
 paho-mqtt
 termcolor
 pandas
-matplotlib
\ No newline at end of file
+matplotlib
+tqdm
\ No newline at end of file
-- 
GitLab