From d4d7de7aabb1f1c45b4171a9407ee48492894d69 Mon Sep 17 00:00:00 2001 From: su530201 <olivier.kaufmann@umons.ac.be> Date: Sat, 15 Apr 2023 22:08:38 +0200 Subject: [PATCH] Sets sampling rate for _compute_tx_volt --- measure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/measure.py b/measure.py index 428cc625..bdc48017 100644 --- a/measure.py +++ b/measure.py @@ -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) -- GitLab