Add single-shot measurement mode matching vendor protocol

Stop command triggers a one-shot reading instead of start+poll+stop.
spectrometer.py now uses take_single_reading() for this flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 09:23:38 +07:00
parent 15d8444cac
commit 3bf4a7ad36
2 changed files with 25 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ def measure():
try:
dev.identify()
dev.set_integration_time(0) # auto
reading = dev.take_reading(psu=False)
reading = dev.take_single_reading()
finally:
dev.close()