From 20c61d5cfffd2fbf22bec4dca13c58d77031c6dc Mon Sep 17 00:00:00 2001 From: grabowski Date: Thu, 5 Feb 2026 14:36:58 +0700 Subject: [PATCH] Use take_single_reading() for single measurements in CLI Only use take_reading() (continuous-style) when --continuous flag is set. Default single measurement now matches vendor single-test behavior. Co-Authored-By: Claude Opus 4.5 --- hpcs6500.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hpcs6500.py b/hpcs6500.py index 02f9fa5..242cedf 100644 --- a/hpcs6500.py +++ b/hpcs6500.py @@ -841,8 +841,10 @@ def main(): if args.passive: result = dev.read_current() - else: + elif args.continuous: result = dev.take_reading(psu=False) + else: + result = dev.take_single_reading() if result is None: print("Failed to get reading")