MicroscopeControl 0.2.6 - #76
Merged
Merged
Conversation
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>
…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>
…(PI stage, TCube laser safety, DCAM4 capture) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 30, 2026
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.2.6 into
main, as one PR. Admiral and the captain agreed this shape on 2026-09-29, the same as #71for 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:
capture. Every frame wait is bounded and armed before the start, and every exit cleans up.Each head is the one the captain accepted after review. The only conflicts were in CHANGELOG
[Unreleased], andboth 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.tomlandtest/runtests.jl) is byte-identical inthis branch to that PR's head.
test/runtests.jlcarries all three PRs' additions.Project.tomlis0.2.6, with no-DEV, so TagOnMerge tagsv0.2.6once lab/tests covers the merged tree. TheCHANGELOG 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:
lock_check_sbelow 0.1 s is refused (Fixed: 0 used to disable the lock check).initializewaits forPI_IsControllerReady(Changed).capturerefuses 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.
t16/v0.2.4-dcam4(97d26f6), which is v0.2.4 plus DCAM4 capture: bound every wait, arm it before the start, clean up on every exit #75's camera files, byte-identical tobcfa0be. In a fresh kernel it took full-frame captures at 12.5 ms (x20), 100 ms (x3) and 250 ms (x3), all good,
with no timeouts and no hangs. A 256x256 capture afterwards needed no reconnect, and check_hardware was 10/10 OK.
to run.
642 nm rig's first calibration reference).
is worth profiling.
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