diff --git a/dev/test_2_mux_2024.py b/dev/test_2_mux_2024.py index 036fa50e0ffe6e59a6955fa4da07d1855bf09912..53271b7198a9ace06ca60d43875b93ba67ed45b4 100644 --- a/dev/test_2_mux_2024.py +++ b/dev/test_2_mux_2024.py @@ -43,8 +43,9 @@ if within_ohmpi: from ohmpi.ohmpi import OhmPi print('Starting test of mux within OhmPi.') k = OhmPi() - k.switch_mux_on([1, 4, 2, 3]) - time.sleep(1.) k.reset_mux() - + k._hw.switch_mux([1, 4, 2, 3], state='on') + k._hw.vab_square_wave(12,1) + k._hw.switch_mux([1, 4, 2, 3], state='off') + k._hw._plot_readings() change_config('../configs/config_default.py', verbose=False) \ No newline at end of file diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index 8c699b998385b34a981e0574a5a075138257ab61..05d035ddb74c1bec637c9cb2d26ad7fd4ef23c07 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -292,6 +292,8 @@ class OhmPiHardware: injection = Thread(target=self._inject, kwargs={'inj_time': 0.2, 'polarity': polarity}) gain_auto.start() injection.start() + gain_auto.join() + injection.join() self._vab_pulses(vab, lengths, sampling_rate, append=append) def _vab_pulse(self, vab, length, sampling_rate=None, polarity=1, append=False):