diff --git a/ohmpi/hardware_components/mb_2023_0_X.py b/ohmpi/hardware_components/mb_2023_0_X.py index bd98758be653b9f85842d8c184848ffdc6963945..5216c77a5f92486b1422b83a01ecc8a700f0b2fd 100644 --- a/ohmpi/hardware_components/mb_2023_0_X.py +++ b/ohmpi/hardware_components/mb_2023_0_X.py @@ -258,7 +258,7 @@ class Rx(RxAbstract): self.exec_logger.event(f'{self.model}\trx_adc_auto_gain\tbegin\t{datetime.datetime.utcnow()}') gain = _ads_1115_gain_auto(AnalogIn(self._ads_voltage, ads.P0, ads.P1)) self.exec_logger.debug(f'Setting RX ADC gain automatically to {gain}') - self.gain = gain + self._adc_gain = gain self.exec_logger.event(f'{self.model}\trx_adc_auto_gain\tend\t{datetime.datetime.utcnow()}') def gain_auto(self): diff --git a/ohmpi/hardware_components/mb_2024_0_2.py b/ohmpi/hardware_components/mb_2024_0_2.py index 801b143ef19c0e404e195cdf2813589a3974790a..940f9c8485e6b01e6c1eaefe2d170eb115a65ef5 100644 --- a/ohmpi/hardware_components/mb_2024_0_2.py +++ b/ohmpi/hardware_components/mb_2024_0_2.py @@ -153,7 +153,7 @@ class Rx(Rx_mb_2023): self.exec_logger.event(f'{self.model}\trx_adc_auto_gain\tbegin\t{datetime.datetime.utcnow()}') gain = _ads_1115_gain_auto(AnalogIn(self._ads_voltage, ads.P0)) self.exec_logger.debug(f'Setting RX ADC gain automatically to {gain}') - self.gain = gain + self._adc_gain = gain self.exec_logger.event(f'{self.model}\trx_adc_auto_gain\tend\t{datetime.datetime.utcnow()}') def _dg411_gain_auto(self): @@ -161,6 +161,7 @@ class Rx(Rx_mb_2023): self._dg411_gain = 1. else: self._dg411_gain = 1/2 + self.exec_logger.debug(f'Setting RX DG411 gain automatically to {self._dg411_gain}') @property def gain(self): @@ -179,6 +180,7 @@ class Rx(Rx_mb_2023): def gain_auto(self): self._dg411_gain_auto() + self.exec_logger.debug(f'Setting RX gain automatically to {self.gain}') @property def voltage(self):