diff --git a/measure.py b/measure.py index 2c1e5f625471a49504bc0f507d731e237520dc43..525b7c840803352411b28a63eaf3903c2911cbc0 100644 --- a/measure.py +++ b/measure.py @@ -60,7 +60,7 @@ class OhmPiHardware: while self.tx_sync.is_set(): cur_time=start_time _readings.append([time.gmtime() - start_time, self.tx.current, self.rx.voltage]) - time.sleep(cur_time+sampling_rate-time.gmtime()) + time.sleep(cur_time+sampling_rate/1000.-time.gmtime()) return np.array(_readings) if sampling_rate is None: diff --git a/test_ohmpi_card_3_15.py b/test_ohmpi_card_3_15.py index e4e10683f8d5e75f9bc8d5f2532fc29e4f378801..6630608491528ed75feb72ad183693ee6adc65ec 100644 --- a/test_ohmpi_card_3_15.py +++ b/test_ohmpi_card_3_15.py @@ -32,7 +32,7 @@ print(f'Dev. {100. * np.std(r)/np.mean(r):.1} %') from OhmPi.measure import OhmPiHardware from utils import change_config -change_config('config_ohmpi_card_3_15.py') +change_config('config_ohmpi_card_3_15.py', verbose=False) k = OhmPiHardware() k._vab_pulse(vab=12, length=2., polarity=1) -change_config('config_default.py') \ No newline at end of file +change_config('config_default.py', verbose=False) \ No newline at end of file