Skip to content

MicroscopeControl 0.2.6 - #76

Merged
kalidke merged 24 commits into
mainfrom
release-0.2.6
Oct 2, 2026
Merged

kalidke merged 24 commits into
mainfrom
release-0.2.6

Conversation

@kalidke

@kalidke kalidke commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Release 0.2.6 into main, as one PR. Admiral and the captain agreed this shape on 2026-09-29, the same as #71
for 0.2.5.

This branch starts at #72's head (7acee6c, the 0.2.6-DEV bump). It then has merge commits of three reviewed PRs,
followed by the 0.2.6 version commit:

Each head is the one the captain accepted after review. The only conflicts were in CHANGELOG [Unreleased], and
both sides are kept under each heading. A check confirmed that every line of each PR's [Unreleased] survives.
Every file each PR changed (other than CHANGELOG, Project.toml and test/runtests.jl) is byte-identical in
this branch to that PR's head. test/runtests.jl carries all three PRs' additions.

Project.toml is 0.2.6, with no -DEV, so TagOnMerge tags v0.2.6 once lab/tests covers the merged tree. The
CHANGELOG has one [0.2.6] section, with a short line per part: PI stage, TCube laser safety and DCAM4 capture.
There are no code changes beyond the merges.

Compatibility (decisions 0033 and 0035): non-breaking. Each PR states its own case. The deliberate behaviour
changes, with the CHANGELOG heading each is under:

  • TCube calls take longer (Changed).
  • A lock_check_s below 0.1 s is refused (Fixed: 0 used to disable the lock check).
  • PI initialize waits for PI_IsControllerReady (Changed).
  • DCAM4 capture refuses while a live view or sequence runs (Changed).

Hardware: the DCAM4 fix is confirmed on the quickbeam rig. Nothing else has run on a rig yet.

Tests: the local suite on this head (kitt, Julia 1.13) is 2010 pass, 3 broken, 0 fail. The two commits after the version commit change only CHANGELOG (review nits N2-N5, and the rig confirmation). The PRs' records were
1890 (#73), 1919 (#74) and 1836 (#75) against a base of 1816, which predicts exactly 2013. lab/tests and lab/docs
on this head follow as commit statuses.

🤖 Generated with Claude Code

kalidke and others added 17 commits September 29, 2026 14:33
No behaviour change: each inline @CCall moves into pi_stage/gcs2.jl unchanged,
so a test can replace the wrappers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Id defaults to -1 and shutdown resets it; connectionstatus is set once,
after every step past the connect; initialize waits for
PI_IsControllerReady before PI_qFRF; the stage panels' initialize buttons
log a failed initialize; stale TODOs and docstrings corrected. Adds
test/pi_stage_fake_sdk.jl and test/pi_stage.jl.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Decision 0033: after X.Y.Z, main carries X.Y.(Z+1)-DEV. TagOnMerge skips a
-DEV version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…istage-fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	CHANGELOG.md
#	test/runtests.jl
…e motion-stop wait, reclaim own connection on retry, one GUI initialize guard

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ze, as in 0.2.5 (#73 Q1)

gui_initialize still logs the failure. 0.2.5 opened the panel when initialize
returned without connecting (MCL_InitHandle == 0), with its callbacks refusing
while connectionstatus is false; the P5 guard's '|| return' stopped that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alibration-reference re-check at the first light_on

- (i) request_twice: every request-then-get site (limit, digpot, status, initialize's limit read, W/A read, tcube_get_current, new read_photocurrent_word) sends its request twice, since the TLD001 answers one request behind.
- (ii) check_lock reads its own photocurrent and status, and refuses on a high ratio, on 0x400, or on a photocurrent below 1/lock_ratio of the request; returns at code 0. PhotodiodeLoop refuses lock_check_s below LOCK_CHECK_MIN_S = 0.1.
- (iii) PhotodiodeLoop, TCubeLaser and SimDiodeLaser take ref_current_mA, ref_photocurrent_A, ref_ratio; the first power-mode light_on after each initialize re-measures the reference in open loop (check_scale!) and refuses on a mismatch, or warns once when there is none.
- Small fixes: measured_current accepts -32768; the header's 17.25 mA potentiometer floor gate is removed; the step estimate is the manual's 0.7 mA.
- The fake answers one request behind, models the photodiode and the 0x400 bit; tests N1-N21 added.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…enable, latch a reference mismatch, fresh reads in setoutputpower!

set_open_loop! confirms open loop before the re-check enables. initialize resets
the loop state first (scale_refused added); a mismatch latches until initialize
and the re-check dwells REFERENCE_DWELL_S. require_clamp checks the TIA range and
returns the fresh status word; check_lock tests the high side before the status
read and runs 0x400 at code 0. The pot step estimate returns to 220/255.
Deletes output_enabled, initialize's LD_RequestReadings and measured_current's
range check. CHANGELOG timings recomputed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…en-loop initialize confirms open loop, latch any re-check failure

M1 wraps require_clamp so a refusal found while the output may be on zeroes and
disables it; M2 makes open-loop initialize confirm open loop with a fresh status
read; M3 deletes setoutputpower!'s dead closed-loop check; M4 corrects the
step-estimate docstrings; M5 latches any failure inside the reference re-check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… every exit

The quickbeam rig saw capture hang at full frame, 12.5 ms (v0.2.4). Fixes:
- DCAMWAIT_START is built with its size (it was sent as 0), and a negative timeout
  (DCAM's INFINITE) is refused before any library call.
- Every frame wait is bounded by capture_timeout_ms: 2 x (exposure + readout) + 1 s,
  with the readout read from the camera (TIMING_READOUTTIME); getdata scales it by N.
- capture stops and releases any earlier capture first, arms the wait before
  dcamcap_start, and stops, releases and closes on every exit. A timeout or failed
  wait logs, sets last_error and throws a clear error.
- getlastframe and getdata no longer destructure dcamwait_close's single DCAMERR
  (a MethodError on every failure path). getdata reads an ended cycle at once,
  never passes DCAM a null wait handle, and cleans up on every exit (in LIVE mode
  it now ends the live view).
- test/dcam4_pure.jl covers what runs without the DCAM library.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nded stop wait

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er facts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	CHANGELOG.md
…olls against a deadline, sequence's poller has one

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… a newer capture, getdata leaves a live view running

Also: getdata reads a READY buffer that never ran as LOSTFRAME, and capture and getlastframe set last_error on a failed frame copy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…re the start, cleanup on every exit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	CHANGELOG.md
…(PI stage, TCube laser safety, DCAM4 capture)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kalidke and others added 7 commits September 29, 2026 20:16
… PI and DCAM4 claims, drop a blank line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… full-frame captures on trial 97d26f6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dated today

The DCAM4 summary no longer says the full-frame capture hang is fixed: the rig's 26 of 26 captures stand, and
the hang seen after the rig's GPU code loaded is named as open and tracked for 0.2.7, as are the NOTREADY,
TIMEOUT and NOTSTABLE errors seen in GUI use. The Fixed entry points to it. The release heading carries the
date it ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…latched refusal

Power mode stays and nothing new is refused. A failed setpoint zero is
flagged (PhotodiodeLoop.zero_failed) and the next light_on warns that the
stored setpoint may be stale. setoutputpower! with the output on and the
photodiode scale unchecked or refused warns. The latched calibration
re-check refusal tries a switch-off first when the output may be lit, and
still throws. CALIBRATION.md records the reference (3b) inside step 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n issues

Brings in the laser and guide parts of the final review pass (ac39877): the calibration-reference
re-check in light_on switches the output off before rethrowing whatever it throws; zero_failed is
cleared only by a zero that lands; the refused-scale warning says to re-initialize; the guide's 3b
block ends with light_off and shutdown. Camera code and tests stay as at cabde64. The camera fixes
(b2327f8, ac39877) are kept on the local branch dcam4-0.2.7 for 0.2.7, and the CHANGELOG lists
them, with two laser limits, under Known issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e another task's abort, live, sequence or capture

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ixed there

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kalidke
kalidke merged commit 5e02f6b into main Oct 2, 2026
5 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