Allow 0s as None

This commit is contained in:
CPD 2025-03-04 17:59:56 +01:00
parent 47d76919fc
commit 90256eb468

View File

@ -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()