Skip to content

lightmeter#18

Merged
naushir merged 4 commits into
mainfrom
cl70
Jul 21, 2026
Merged

lightmeter#18
naushir merged 4 commits into
mainfrom
cl70

Conversation

@naushir

@naushir naushir commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

naushir added 4 commits July 21, 2026 12:57
Introduces a hardware-free LightMeter abstract interface and a Measurement
result type (illuminance, colour temperature and optional colorimetry, CRI and
spectrum), mirroring the existing Lightbox control API. Concrete drivers and
the device-agnostic factory build on this in a following change.
Implement the interface protocol (commands, ACK/data-response framing and the
binary measurement-result layout) over a raw-USB bulk transport, exposed
through the generic light-meter API and unit-tested against a fake transport.
Transport parameters and byte order are confirmed against a physical meter
(0x0a41:0x7003, EP OUT 0x02 / IN 0x81, big-endian numeric fields). The meter
silently swallows the first command it receives after sitting idle, so the
driver drains and resends once when an acknowledgement times out, and accepts
a late data response arriving in place of an ACK.
…-tag

With a meter present the capture and preview pages keep the readout live,
sampling on a 5 s timer (toggleable; ticks are skipped while a request is in
flight or the tab is hidden), with the readings spread across the card and the
controls grouped to the right. Each capture stores a reading in the project
sidecar — taken alongside the camera burst, one per burst, without the 1 nm
spectrum — shown as a measured chip on the Images page, and an Auto-tag
checkbox optionally drives the filename's colour temp and lux tags from the
latest reading, greying out the fields it controls; without a meter everything
behaves as before. Also merge lightbox status replies over the state defaults,
fixing a console TypeError on pages loaded with no lightbox attached.
With both a lightbox and a light meter attached, an Auto-capture option cycles
the lightbox through a chosen set of lamps (each at a per-lamp intensity), waits
for the meter to stabilise after every switch, and captures a Macbeth burst per
lamp tagged from the measured reading, optionally finishing with dark frames
after a lens-cap pause. The cycle runs as a generator streamed to the browser
over SSE with a live progress popup and cancel; per-lamp failures are reported
and skipped while only a camera error aborts. Lightbox.info() now reports
per-channel default intensities to prefill the dialog, and the images view no
longer prints a spurious colour-temp chip for untagged dark frames.
@naushir
naushir merged commit 536e14f into main Jul 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant