Skip to content

STAR save_configuration: firmware_variable values written beside the fields - #1461

Closed
BioCam wants to merge 1 commit into
PyLabRobot:star-x-arm-two-digit-current-limitfrom
BioCam:star-saved-firmware-variable
Closed

BioCam wants to merge 1 commit into
PyLabRobot:star-x-arm-two-digit-current-limitfrom
BioCam:star-saved-firmware-variable

Conversation

@BioCam

@BioCam BioCam commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Since #1458 an X-arm's current_limit_range and current_limit_digits are properties read off its firmware_version, so save_configuration no longer writes them: dataclasses.asdict takes fields only. A saved configuration then shows firmware_version but not the limiter range the driver will enforce for it, and the recordings could not keep the range either - test_every_key_is_a_field refuses a key nothing reads back.

  • a configuration lists the properties its firmware version decides in firmware_variable, a ClassVar: never a field, fine on a frozen dataclass
  • save_configuration writes them in a firmware_variable block beside the fields, nested configurations included; reading back ignores the block and the values come from the code
  • XArmConfiguration.firmware_variable = ("current_limit_range", "current_limit_digits")
  • the five recordings carry the block under device.left_arm; design.md P13 says what it is
"left_arm": {
  "firmware_version": "5.0S a 2012-04-03 (X0 XE167)",
  "current_limit_default": 7,
  "firmware_variable": {"current_limit_range": [0, 15], "current_limit_digits": 2}
}

Tests: master_tests - every firmware_variable block in a recording holds exactly what the code gives, nothing missing or extra; keys_no_field_reads passes the block and nothing else; a saved arm carries its block.

🤖 Generated with Claude Code

…fields

A configuration lists in firmware_variable the properties its firmware
version decides; save_configuration writes them in a firmware_variable
block, which reading back ignores. The recordings carry the X-arm's
current limiter range and digits, and a test checks each block against
what the code gives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BioCam BioCam closed this Oct 2, 2026
@BioCam
BioCam deleted the star-saved-firmware-variable branch October 2, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant