opt-in firmware compat for the teaching-handle encoder - #1
Open
imdark wants to merge 1 commit into
Open
Conversation
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.
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.
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: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.