v1: PreciseFlexArmBackend: classify the arm's reach (standard / extended / unknown) from controller link lengths#1098
Merged
Conversation
…ended / unknown) from controller link lengths Adds a private `_classify_pf400_reach((l1, l2))` that classifies a PreciseFlex arm's controller-read link lengths against the two known PF400 configs - standard (225/210 mm) and extended (302/289 mm) - returning "standard", "extended", or "unknown". `PreciseFlexConfiguration.reach_class` is derived from it (`ARM_LINKS_STANDARD`/`ARM_LINKS_EXTENDED` as the single source of truth, 5 mm match tolerance), and setup warns when the lengths match neither known arm. 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 a private
_classify_pf400_reach((l1, l2))helper that classifies a PreciseFlex arm's controller-read link lengths against the two known PF400 configurations - standard (225/210mm) and extended (302/289mm) - returning"standard","extended", or"unknown".PreciseFlexConfiguration.reach_classis now derived from it, and setup logs a warning when the link lengths match neither known arm (a sign the arm's device-stored link lengths may have been changed).ARM_LINKS_STANDARD,ARM_LINKS_EXTENDED), per the PF400 System Dimensions (drawing 615287);PF400Paramslink defaults now reference the extended (XR) pair.reach_classpreviously used an inlinel1 + l2 >= 513threshold that could only return"standard"or"extended"; it now also reports"unknown"and warns, surfacing a mismatched / tampered geometry instead of silently guessing.Backward compatible:
reach_classkeeps its"standard"/"extended"values and adds"unknown"; its default is"extended", matching the defaultPF400Params(the extended/XR link lengths). No call sites change.Tests:
_classify_pf400_reachover standard, extended, within-tolerance, and unmatched link lengths.No new device I/O - it classifies the link lengths already read from the controller at setup.
🤖 Generated with Claude Code