Commit 8d291481 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Attemps to use the sampling_rate in _vab_pulse

Showing with 2 additions and 2 deletions
+2 -2
...@@ -66,8 +66,8 @@ class OhmPiHardware: ...@@ -66,8 +66,8 @@ class OhmPiHardware:
lap = datetime.datetime.utcnow() lap = datetime.datetime.utcnow()
_readings.append([elapsed_seconds(start_time), self.tx.current, self.rx.voltage]) _readings.append([elapsed_seconds(start_time), self.tx.current, self.rx.voltage])
sleep_time = sampling_rate/1000.-elapsed_seconds(lap) sleep_time = sampling_rate/1000.-elapsed_seconds(lap)
print(f'sleep_time') print(f'sleep_time: {sleep_time}')
time.sleep(np.min[sleep_time, np.abs(sleep_time)]) time.sleep(np.min([sleep_time, np.abs(sleep_time)]))
data = np.array(_readings) data = np.array(_readings)
if sampling_rate is None: 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