STARBackend: 96-head Y/Z drive speed & acceleration set/request, scoped to each move#1088
Open
BioCam wants to merge 2 commits into
Open
STARBackend: 96-head Y/Z drive speed & acceleration set/request, scoped to each move#1088BioCam wants to merge 2 commits into
STARBackend: 96-head Y/Z drive speed & acceleration set/request, scoped to each move#1088BioCam wants to merge 2 commits into
Conversation
…A/RA Add head96_set_y_speed / head96_set_y_acceleration / head96_set_z_speed / head96_set_z_acceleration, each saving the persistent drive parameter (yv/yr/zv/zr) standalone via H0 AA - no move - so subsequent moves (including the C0-level 96-head commands) inherit it, the same mechanism slow_iswap uses with R0 AA on wv/tv. Add the read counterparts head96_request_y_speed / _y_acceleration / _z_speed / _z_acceleration via H0 RA, with z-acceleration inverting the firmware-version scaling that the setter applies. Validation mirrors the existing move methods; setters are @_requires_head96, getters unguarded. NOTE: unverified on hardware - that AA accepts these parameter names and RA reads them back in the assumed field widths is inferred by analogy to slow_iswap; confirm with a set/request round-trip on the device. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…retract Z on crash A ZA/YA move leaves its speed and acceleration in the drive's volatile register, so a later move or C0-level command inherits them (confirmed on hardware: a speed=20 Z move reads zv back as 20). head96_move_stop_disk_z and head96_move_y reset the drive parameters to the head's default after the move, skipping the reset for parameters the caller left at default (no churn on plain moves); reset_z_parameters / reset_y_parameters opt out. head96_move_stop_disk_z retracts to Z-safety on any firmware error before re-raising, via retract_on_crash (head96_move_to_z_safety passes False so the retract cannot recurse). head96_move_y speed/acceleration now default to None (firmware default) instead of 300, matching head96_move_stop_disk_z. 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.
Adds set/request for the 96-head Y and Z drive speed and acceleration (
H0 AA/H0 RA), and uses them so a move's speed and acceleration are scoped to that single call. Builds on #1086 (the Z move primitives) and #1087 (the per-drive defaults).A
ZA/YAmove writes its speed and acceleration into the drive's volatile register and leaves them there, so a later move - or aC0-level command (aspirate96/dispense96) that sends none of its own - silently inherits the previous move's values. Confirmed on hardware: aspeed=20Z move readszvback as 20.head96_set_y_speed/head96_set_y_acceleration/head96_set_z_speed/head96_set_z_acceleration(H0 AA): save a persistent drive parameter standalone, no move - the same mechanismslow_iswapuses on the iSWAP viaR0 AA.head96_request_y_speed/head96_request_y_acceleration/head96_request_z_speed/head96_request_z_acceleration(H0 RA): the read counterparts.head96_move_stop_disk_zandhead96_move_yreset the drive speed/acceleration to the head's default after the move, skipping the reset when the caller left a parameter at its default (so a plain move adds no register writes);reset_z_parameters/reset_y_parametersopt out.head96_move_stop_disk_zretracts to Z-safety on any firmware error (e.g. the head crashing into something) before re-raising, viaretract_on_crash;head96_move_to_z_safetypasses it False so the retract cannot recurse.Behaviour change to note for review:
head96_move_y'sspeed/accelerationnow default toNone(resolving to the firmware default, e.g. 390.62 mm/s) instead of a hardcoded 300, matchinghead96_move_stop_disk_z.Validated on hardware:
RAreads match the firmware-resolved defaults inHead96Information, and anAAset followed byRAround-trips exactly.