Commit 4e9c3353 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Attemps to use the sampling_rate in _vab_pulse

No related merge requests found
Showing with 3 additions and 1 deletion
+3 -1
......@@ -65,7 +65,9 @@ class OhmPiHardware:
while self.tx_sync.is_set():
lap = datetime.datetime.utcnow()
_readings.append([elapsed_seconds(start_time), self.tx.current, self.rx.voltage])
time.sleep(sampling_rate/1000.-elapsed_seconds(lap))
sleep_time = sampling_rate/1000.-elapsed_seconds(lap)
print(f'sleep_time')
time.sleep(np.min[sleep_time, np.abs(sleep_time)])
data = np.array(_readings)
if sampling_rate is None:
......
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