From 90256eb468e1e6a9ac6f44d328c9d2818dfa78e3 Mon Sep 17 00:00:00 2001 From: CPD Date: Tue, 4 Mar 2025 17:59:56 +0100 Subject: [PATCH] Allow 0s as None --- cpdctrl/measurement.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpdctrl/measurement.py b/cpdctrl/measurement.py index 500e86b..3b371e6 100644 --- a/cpdctrl/measurement.py +++ b/cpdctrl/measurement.py @@ -83,6 +83,9 @@ def measure( vm_dev.reset(True) if use_buffer: vm_dev.buffer_measure(delta_t, verbose=True) + # allow 0 instead of None + if max_measurements == 0: max_measurements = None + if flush_after == 0: flush_after = None try: i = 0 led_val = led_script.start()