From 97c015efaa1f4aaa218fac9fa2bb112df9dd76fb Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Wed, 18 Oct 2023 22:18:58 +0200
Subject: [PATCH] Fixes bug in mb_2023 TX_init with adc_gain

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

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index bf862fb2..fa6df79d 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -469,7 +469,7 @@ class OhmPiHardware:
         if 1. / self.rx.sampling_rate > pulse_duration:
             sampling_rate = 1. / pulse_duration  # TODO: check this...
         else:
-            sampling_rate = self.tx.sampling_rate
+            sampling_rate = self.rx.sampling_rate
         current, voltage = 0., 0.
         if self.tx.pwr.voltage_adjustable:
             self.tx.pwr.voltage = vab
-- 
GitLab