STARBackend: resolve installed X-arms into XArmInformation at setup#1167
Open
BioCam wants to merge 1 commit into
Open
STARBackend: resolve installed X-arms into XArmInformation at setup#1167BioCam wants to merge 1 commit into
STARBackend: resolve installed X-arms into XArmInformation at setup#1167BioCam wants to merge 1 commit into
Conversation
BioCam
force-pushed
the
pr1-xarm-information
branch
2 times, most recently
from
July 20, 2026 14:11
db798f9 to
e960cb1
Compare
Fuse the STAR's X-arm configuration information (arm widths, drive travel ranges, working envelopes) into one record resolved once at setup, mirroring iSWAPInformation and Head96Information. Adds XArmInformation / SingleXArmInformation, the x_arm_information property, _build_x_arm_information, and DriveConfiguration.is_present; the drive-range and working-envelope request methods now parse into typed dicts instead of returning the raw firmware string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BioCam
force-pushed
the
pr1-xarm-information
branch
from
July 20, 2026 14:52
e960cb1 to
03630d7
Compare
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 STAR reports its X-arm layout at setup across three replies - arm widths, drive travel ranges, and working envelopes - but nothing fuses them into a single record. The two underlying request methods returned the raw firmware strings, had zero in-tree callers, and left any consumer to re-parse and cross-reference all three sources itself.
This adds the source-of-truth record the X-arm tracking work builds on: one
SingleXArmInformationper installed arm, resolved once at setup, mirroringiSWAPInformation(#1055) andHead96Information(#1084).Resolved parameters
number_x_arms— count of installed arms:1(left rail only, the common STAR) or2(both rails).position— which rail the arm sits on:leftorright.width— arm width in mm, from the machine configuration (e.g.370.0dual-rail;≤300single-rail).model— variant derived fromwidth:hamilton_legacy_star_dual_rail_arm(width > 300) orhamilton_legacy_star_single_right_rail_arm(width ≤ 300).reference_point— where the tracked X refers to, derived fromwidth:center(dual-rail) orright(single-right-rail).x_range— drive travel(min, max)in mm (e.g. dual-rail left(95.0, 1340.4)).workspace_range— reachable X workspace(min, max)in mm (e.g.(-323.2, 1517.4)).Changes
XArmInformation(left/right,number_x_arms) andSingleXArmInformation(the fields above), bothfrozen(eq=False)like the other Information records._build_x_arm_informationfuses the arm widths, drive travel ranges, and working envelopes into the record at setup, exposed via thex_arm_informationproperty (raises before setup)._x_arm_model_and_reference.request_maximal_ranges_of_x_drivesandrequest_working_envelopes_per_arm(renamed fromrequest_present_wrap_size_of_installed_arms) now parse their replies into typed(min, max)dicts instead of returning the raw string.DriveConfiguration.is_presentreports whether a drive carries any module, so an absent right arm resolves toNone.STARChatterboxBackendemits the matching replies and builds the record at setup like the hardware backend.Behaviour: additive - the two request methods had no in-tree callers, so the rename and return-shape change affect nothing downstream, and
x_arm_informationis new surface. The single-rail left-drive minimum is fabricated only in the chatterbox (named_DUAL_RAIL_LEFT_X_MIN, 95.0); hardware reads its own value from the drive-range query, and no single-rail dump exists yet to test that path (#822).Tests: adds
TestXArmInformation(the fused record on the default single-left-arm sim, plus_x_arm_model_and_referenceby width) andTestXArmRangeQueries(the range and working-envelope parsers against replies observed on real machines); ruff format, ruff check --select I,F, and mypy are clean, and the STAR suite passes.🤖 Generated with Claude Code