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

Sets sampling rate for _compute_tx_volt

Showing with 1 addition and 1 deletion
+1 -1
......@@ -65,7 +65,7 @@ class OhmPiHardware:
_readings.append([elapsed_seconds(start_time), self.tx.current, self.rx.voltage])
sample+=1
sleep_time = start_time + datetime.timedelta(seconds = sample * sampling_rate / 1000) - lap
print(f'sleep_time: {sleep_time.total_seconds()} seconds')
print(f'start_time: {start_time}, lap: {lap}, sample: {sample}, sleep_time: {sleep_time.total_seconds()} seconds')
time.sleep(np.min([0, np.abs(sleep_time.total_seconds())]))
self.readings = np.array(_readings)
......
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