diff --git a/ohmpi/hardware_components/mb_2023_0_X.py b/ohmpi/hardware_components/mb_2023_0_X.py index b900f80f7ba0a06bcac09c9af3aa91cda4a10e9d..3ef4fe87f2e1ff4feb492891ee50d0971010936a 100644 --- a/ohmpi/hardware_components/mb_2023_0_X.py +++ b/ohmpi/hardware_components/mb_2023_0_X.py @@ -191,7 +191,7 @@ class Tx(TxAbstract): assert self.adc_voltage_min / (50 * self.r_shunt) <= value <= self.adc_voltage_max / (50 * self.r_shunt) self.exec_logger.warning(f'Current pulse is not implemented for the {self.board_name} board') - def gain_auto(self, value): + def gain_auto(self): self._adc_gain_auto() def inject(self, polarity=1, injection_duration=None): diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index cce7c7938b445104aa9c130abb3445ad4b0fdb7c..1c94aa2e7387abdaea2f1ab9b8efb9307b2a3bbf 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -179,12 +179,12 @@ class OhmPiHardware: # self.tx_sync.wait() # set gains automatically injection = Thread(target=self._inject, kwargs={'injection_duration': 0.2, 'polarity': pol}) - self.tx.gain_auto() tx_gains.append(self.tx.gain) - readings = Thread(target=self._read_values) - readings.start() + # readings = Thread(target=self._read_values) + get_gain = Thread(target=self.tx.gain_auto) + get_gain.start() injection.start() - readings.join() + get_gain.join() injection.join() v = self.readings[:, 2] != 0 current = max(current, np.mean(self.readings[v, 3]))