Skip to content

Fix for Custom PIDs #218#221

Merged
PowerBroker2 merged 1 commit intoPowerBroker2:masterfrom
jimwhitelaw:add-mode-22
Feb 7, 2024
Merged

Fix for Custom PIDs #218#221
PowerBroker2 merged 1 commit intoPowerBroker2:masterfrom
jimwhitelaw:add-mode-22

Conversation

@jimwhitelaw
Copy link
Collaborator

Mode 0x22 response headers always zero-pad the pid to 4 chars, even for a 2-char pid. That confused the header detection and response parsing. This change checks for the mode and pid in findResponse() and adjusts the expected header accordingly.

Mode 0x22 response headers always zero-pad the pid to 4 chars, even for a 2-char pid. That confused the header detection and response parsing. This change checks for the mode and pid in findResponse() and adjusts the expected header accordingly.
Copy link
Collaborator Author

@jimwhitelaw jimwhitelaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work for all CAN enhanced data (Service/Mode 0x22), but there might be other services that respond similarly. This change does not attempt to address other services.

@PowerBroker2 PowerBroker2 merged commit 294907b into PowerBroker2:master Feb 7, 2024
@jimwhitelaw jimwhitelaw deleted the add-mode-22 branch February 7, 2024 04:41
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.

2 participants