STARBackend: consolidate 96-head limits and resolutions into Head96Information#1084
Merged
Conversation
…ormation Head96Information now carries the firmware/variant-derived 96-head limits, in standard units, as (min, max) range tuples: aspiration_volume_range (uL), dispensing_drive_speed_range (uL/s), and z_range (mm). Each is resolved at setup by a dedicated _head96_resolve_*_range method (grouped with the other Head96Information gatherers) that branches on fw_version.year (2008->2013 volume/speed widening, matching head96_move_z's boundary) and instrument_type (FM-STAR's extended Z window), converting firmware increments to units via the existing converters. Populated in set_up_core96_head and the chatterbox. Increments remain recomputable from the record on demand. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The minimum dispensing-drive speed increment in _head96_resolve_dispensing_drive_speed_range was a bare literal 5; give it a named local (min_inc) with its firmware meaning. Also clarify the z_range docstring (za/zb/zh share the FM-STAR-extended Z window, per the H0 command set). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace head96_move_z's hardcoded [180.5, 342.5] mm Z check with the firmware/variant-derived z_range resolved onto Head96Information at setup. On FM-STAR heads this correctly accepts the extended 121-381 mm window (za/zb/zh share it per the H0 command set) instead of capping at the legacy range; legacy heads are unchanged. The out-of-range message now reports the head's actual window. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…formation Move the encoder step resolutions onto Head96Information as defaulted fields; the STARBackend class constants now alias those so existing references keep working. Add the Y window (y_range, y_speed_range) and wire head96_move_y to validate against them, matching the existing z_range wiring. Order the fields in X, Y, Z sequence and rename aspiration_volume_range to dispensing_drive_range (the piston window applies to both aspirate and dispense). Make Head96Information frozen(eq=False), matching iSWAPInformation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ware Indices 1 and 2 of the 96-head configuration are only populated from 2025 firmware onward; earlier firmware returns them as reserve, so stop_disc_type falls back to core_i and instrument_type to legacy on older instruments. Record this in the _head96_request_configuration docstring. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Follow-up applying the
iSWAPInformationconsolidation (#1055) to the 96-head. Moves the firmware/variant-derived 96-head limits and encoder resolutions out of scatteredSTARBackendhandling and intoHead96Information, resolved once at setup, so the record holds everything known about the installed 96-head.Head96Informationgains, in standard units:y_range,y_speed_range(mm/s),z_range(mm),dispensing_drive_range(uL),dispensing_drive_speed_range(uL/s), plus the Y / Z / dispensing / squeezer encoder resolutions as fields. Each range is resolved at setup from firmware version and instrument type; theSTARBackendclass constants now alias the record's defaults for backward compatibility.Head96Informationis nowfrozen(eq=False), matchingiSWAPInformation(STARBackend: makeiSWAPInformationimmutable #1066).head96_move_zandhead96_move_yvalidate against the resolved ranges instead of hardcoded values.Behaviour is identical on 2010+ firmware. Two firmware-correct changes to note for review:
head96_move_znow accepts the FM-STAR-extended Z window on FM-STAR heads, and the Y window shifts on pre-2010 firmware.