Commit eca4e636 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes misinterpretation of sampling_rate as sample duration

Showing with 1 addition and 1 deletion
+1 -1
......@@ -172,7 +172,7 @@ class OhmPiHardware:
_readings.append([elapsed_seconds(self._start_time), self._pulse, self.tx.polarity, self.tx.current,
self.rx.voltage])
sample += 1
sleep_time = self._start_time + datetime.timedelta(seconds=sample / sampling_rate * 1000) - lap
sleep_time = self._start_time + datetime.timedelta(seconds=sample / sampling_rate) - lap
if sleep_time.total_seconds() < 0.:
_readings.append([elapsed_seconds(self._start_time), self._pulse, self.tx.polarity, np.nan, np.nan])
sample += 1
......
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