From df6871a8af5014b70b714acf75c2cea87ff3d92c Mon Sep 17 00:00:00 2001
From: awatlet <arnaud.watlet@umons.ac.be>
Date: Tue, 10 Oct 2023 11:41:46 +0200
Subject: [PATCH] Fixes polarity issue

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

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index 1a422bc9..86c7cfba 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -177,7 +177,7 @@ class OhmPiHardware:
         tx_gains = []
         rx_gains = []
         for pol in polarities:
-            self.tx.polarity = pol
+            # self.tx.polarity = pol
             # self.tx_sync.wait()
             # set gains automatically
             injection = Thread(target=self._inject, kwargs={'injection_duration': 0.2, 'polarity': pol})
@@ -430,7 +430,7 @@ class OhmPiHardware:
         injection.start()
         readings.join()
         injection.join()
-        self.tx.polarity = 0
+        self.tx.polarity = 0   #TODO: is this necessary?
 
     def _vab_pulses(self, vab, durations, sampling_rate, polarities=None, append=False):
         n_pulses = len(durations)
-- 
GitLab