From 7461184c86120d8d633c6f878d1ba7ff2bf7df4d Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Wed, 14 Jun 2023 13:02:14 +0200
Subject: [PATCH] Investigates duratio of first sample of each pulse

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

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index 05d035dd..f5b3ae46 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -155,12 +155,14 @@ class OhmPiHardware:
             pulses.update({i: {'polarity': int(r[0, 2]), 'iab': r[:, 3], 'vmn': r[:, 4]}})
         return pulses
 
-    def _read_values(self, sampling_rate, append=False):  # noqa
+    def _read_values(self, sampling_rate=None, append=False):  # noqa
         if not append:
             self._clear_values()
             _readings = []
         else:
             _readings = self.readings.tolist()
+        if sampling_rate is None:
+            sampling_rate = self.tx.sampling_rate
         sample = 0
         self.tx_sync.wait()  #
         if not append or self._start_time is None:
-- 
GitLab