From 95916c5d40a9a2f1563ae01108f1fa90b2381778 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Thu, 19 Oct 2023 23:59:33 +0200
Subject: [PATCH] Adds constant strategy

---
 ohmpi/hardware_system.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index ba893a8a..603dce28 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -435,7 +435,8 @@ class OhmPiHardware:
             current, voltage = 0., 0.
             diff_vab = np.inf
             if strategy == 'constant':
-                vab_max = tx_volt * 1.001
+                vab_max = tx_volt
+                tx_volt = tx_volt * .9
                 strategy = 'vmax'
             if strategy == 'vmax':
                 while (k < n_steps) and (diff_vab > diff_vab_lim) and (vab_list[k] < vab_max):
-- 
GitLab