Skip to content

opt-in firmware compat for the teaching-handle encoder - #1

Open
imdark wants to merge 1 commit into
Physical-Intelligence:mainfrom
Pantheon-Industries-Inc:yam-handle-encoder-firmware-compat
Open

opt-in firmware compat for the teaching-handle encoder#1
imdark wants to merge 1 commit into
Physical-Intelligence:mainfrom
Pantheon-Industries-Inc:yam-handle-encoder-firmware-compat

Conversation

@imdark

@imdark imdark commented Jul 9, 2026

Copy link
Copy Markdown

The YAM teaching-handle passive encoder (read via DriverArx, the shared CAN driver) changed its EEPROM reply format across firmware revisions. Add a config field passive_encoder_firmware_compat (bool, default false) that, when set, makes setup tolerant of multiple revisions:

  • read_passive_encoder_eeprom accepts both the <=2.2.x READINGS reply (cmd 0x86, 5 bytes) and the >=2.3.x dedicated GET_EEPROM reply (cmd 0x87, 3 bytes);
  • read_passive_encoder_frequency falls back to the 8-bit low byte when the 16-bit high-byte offset is unimplemented on <=2.2.12 EEPROMs.

Default false preserves the original strict single-format behavior, so ARX arms and any encoder that does not opt in are unchanged. The flag is threaded servo config -> register_passive_encoder -> PassiveEncoderRoute -> configure_passive_encoder -> the two read functions.

Rather than change the canonical E_Yam_Handle config, ship a separate effector variant E_Yam_Handle_compat (model + instance + mass) that enables the flag, registered in SUPPORTED_EFFECTORS. The passive encoder exists only on the YAM handle, so the change stays isolated; select E_Yam_Handle_compat as the effector_model on hosts whose handle firmware needs the compatibility layer.

The YAM teaching-handle passive encoder (read via DriverArx, the shared CAN
driver) changed its EEPROM reply format across firmware revisions. Add a
config field `passive_encoder_firmware_compat` (bool, default false) that,
when set, makes setup tolerant of multiple revisions:

- read_passive_encoder_eeprom accepts both the <=2.2.x READINGS reply
  (cmd 0x86, 5 bytes) and the >=2.3.x dedicated GET_EEPROM reply
  (cmd 0x87, 3 bytes);
- read_passive_encoder_frequency falls back to the 8-bit low byte when the
  16-bit high-byte offset is unimplemented on <=2.2.12 EEPROMs.

Default false preserves the original strict single-format behavior, so ARX
arms and any encoder that does not opt in are unchanged. The flag is threaded
servo config -> register_passive_encoder -> PassiveEncoderRoute ->
configure_passive_encoder -> the two read functions.

Rather than change the canonical E_Yam_Handle config, ship a separate effector
variant E_Yam_Handle_compat (model + instance + mass) that enables the flag,
registered in SUPPORTED_EFFECTORS. The passive encoder exists only on the YAM
handle, so the change stays isolated; select E_Yam_Handle_compat as the
effector_model on hosts whose handle firmware needs the compatibility layer.
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