From b7d2a4d81eee2d320f5c3b85d808249f5a27e823 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Sat, 15 Apr 2023 12:35:21 +0200
Subject: [PATCH] Attempts to fix property issue in TxAbstract init

---
 hardware/abstract_hardware.py | 2 +-
 hardware/ohmpi_card_3_15.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hardware/abstract_hardware.py b/hardware/abstract_hardware.py
index 47bf1771..9db4a787 100644
--- a/hardware/abstract_hardware.py
+++ b/hardware/abstract_hardware.py
@@ -27,7 +27,7 @@ class TxAbstract(ABC):
         #self._polarity = polarity
         self._inj_time = None
         self._dps_state = 'off'
-        self.adc_gain = 1.
+        self._adc_gain = 1.
         self.polarity = polarity
         self.inj_time = inj_time
         self.exec_logger.debug(f'{self.board_name} TX initialization')
diff --git a/hardware/ohmpi_card_3_15.py b/hardware/ohmpi_card_3_15.py
index 184c27d4..c5f3874c 100644
--- a/hardware/ohmpi_card_3_15.py
+++ b/hardware/ohmpi_card_3_15.py
@@ -73,7 +73,7 @@ class Tx(TxAbstract):
         self.mcp_board = MCP23008(self.controller.bus, address=TX_CONFIG['mcp_board_address'])
 
         # ADS1115 for current measurement (AB)
-        self._adc_gain = 2/3
+        self.adc_gain = 2/3
         self._ads_current_address = 0x48
         self._ads_current = ads.ADS1115(self.controller.bus, gain=self.adc_gain, data_rate=860,
                                         address=self._ads_current_address)
-- 
GitLab