Commit 99bc47ee authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes error as sampling rate is expressed in ms and sleep in seconds

No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
......@@ -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:
......
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment