Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for responses longer than 4 hex digits #39

Merged

Conversation

JakubDziworski
Copy link
Contributor

@JakubDziworski JakubDziworski commented Jul 7, 2020

There are PID commands that result in responses longer than 4 hex digits. For example 223277 code for opel insignia returns 6 hex digits response (kms since last dpf regeneration). I logged some variables when debugging the PID:

 query: 223277
 firstHeadIndex: 6
 secondHeadIndex: -1
 payload: 22327762327700000E
 header: 623277
 firstDatum: 12
 recBytes: 18
 payBytes: 6

As you can see the response should be 00000E (15km since dpf regeneration) but currently it returns 0000 since implementation is fixed on only two types of responses size (2 and 4 digits).

I added more generic implementation which reads everything from firstDatum till the end thus allowing any response size.

I've done some regression testing with multiple commands on opel insignia and found it works fine

Let me know what you think

@PowerBroker2 PowerBroker2 self-assigned this Jul 7, 2020
@PowerBroker2 PowerBroker2 merged commit 5462665 into PowerBroker2:master Jul 7, 2020
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