Repository navigation
Conversation
BioCam
force-pushed
the
pf-stack-3-configuration
branch
3 times, most recently
from
October 18, 2026 02:25
1282588 to
204997e
Compare
BioCam
marked this pull request as ready for review
October 18, 2026 02:25
The controller takes one connection (port 10100 refuses a second) and matches a reply to its command only by order. Two callers writing before either reads would each take the other's reply, with no error to show it. - `_locked_exchange` holds a lock around each write and its reply; the interrupt halt bypasses it - `send_command` goes through it, with the reply check split out as `_ensure_successful`, so a reply in another grammar can be read through the same exchange Wire: unchanged. Tests: precise_flex_tests - concurrent commands keep their write and read paired; a failed exchange releases the lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s cameras, not a letter in a name `is_vision_gripper` was read from the model name's suffix. A name says what was ordered, not what is fitted: an arm named without a V can carry a camera gripper, and one named with it may not. - discovery counts the cameras through the controller (`VToolProperty System CameraCount`) when its IntelliGuide module is loaded; an arm that will not say has none - `camera_count` on the configuration; `has_vision_gripper` is true when it is above 0 - `is_vision_gripper` warns and answers `has_vision_gripper` Wire: setup reads `VToolProperty System CameraCount` after `version` on an arm with IntelliGuide. Tests: configuration_tests - the count decides, not the name; wire_tests - the read in setup, answered as the arm answered it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orted to a file What an arm reported at setup was held only for the session, so nothing could be compared across sessions or handed to code that runs without the arm. - `save_configuration(path)` writes the configuration as JSON, shaped as the STAR's: the device's own under `device`, and each fitted feature's beside it under its name (`arm`, `gripper`, `rail`); it refuses before setup - `read_configuration(path)` reads the sections back into the dataclasses: axes by name, ranges as tuples, a field or feature the driver does not know left out; live state is not written Tests: configuration_tests - a configuration reads back as it was written, each feature beside the device. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was no real configuration to test against or to declare from. - `driver/recordings/pf400_extended_400mm.json`: what an extended-reach PF400 with 400 mm of Z travel and a two-camera gripper answered, saved by the driver at setup; its serial is blanked - `driver/recordings/README.md`: what it is and how one is written Tests: configuration_tests - it is the arm it is named for, and exactly what the driver writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck it at discovery
A caller who knows which arm they expect had no way to say so, and nothing noticed when setup met
a different one.
- `declared_configuration_json`: a file `save_configuration` wrote, read into `declared` when the
driver is built, as the STAR reads its own (`{}` when nothing is declared)
- discovery raises, naming each difference, when the declaration does not describe the device that
answers: what is fitted, its link and tool lengths, its soft limits; identity is not compared,
so a declaration taken off one arm stands for another of the same build
Tests: configuration_tests - the same build passes, each difference is named, a refused
declaration adopts nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The table still named `PreciseFlex`, the deprecated name, as what emits the PreciseFlex events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BioCam
force-pushed
the
pf-stack-3-configuration
branch
from
October 19, 2026 21:55
204997e to
8c38a98
Compare
This branch has not been deployed
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.
The Problem
What an arm reports at setup lives only for the session. It cannot be written down, compared with another session, or handed to code that runs without the arm, and a caller who knows which arm they expect has no way to say so: setup adopts whatever answers.
is_vision_gripperis read from the last letter of the model name. A name says what was ordered, not what is fitted: an arm named without a V can carry a camera gripper, and one named with it may not.The controller takes one connection and matches a reply to its command only by order. Nothing stops two callers from writing before either reads, and each would then take the other's reply with no error to show it.
Solution
_locked_exchangeholds a lock around each write and its reply;send_commandgoes through it, and the reply check is split out as_ensure_successfulso a reply in another grammar can be read through the same exchange. The interrupt halt bypasses the lock.VToolProperty System CameraCount) when its IntelliGuide module is loaded.camera_countis on the configuration,has_vision_gripperis true when it is above 0, andis_vision_gripperwarns and answershas_vision_gripper.save_configuration(path)writes the configuration as JSON in the STAR's shape: the device's own underdevice, and each fitted feature's beside it under its name (arm,gripper,rail).read_configuration(path)reads the sections back into the dataclasses, with axes by name and ranges as tuples. Live state is not written, and a field or feature the driver does not know is left out.driver/recordings/pf400_extended_400mm.jsonis what an extended-reach PF400 with 400 mm of Z travel and a two-camera gripper answered, saved by the driver at setup on the arm, with its serial blanked.declared_configuration_jsonnames a filesave_configurationwrote, read intodeclaredwhen the driver is built, as the STAR reads its own. Discovery raises, naming each difference, when it does not describe the device that answers: what is fitted, its link and tool lengths, its soft limits. Identity is not compared, so a declaration taken off one arm stands for another of the same build.The one change on the wire is the camera count: setup reads
VToolProperty System CameraCountafterversionon an arm with IntelliGuide, answered in the tests as the arm answered it (2).🤖 Generated with Claude Code