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

Fix for issue myELM327.supportedPIDs_1_20() not working as expected … #205

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

jimwhitelaw
Copy link
Collaborator

Fixed the issue with incorrect values being returned from findResponse() even though the received bytes were correct. The bug was caused by bit shifting the uint8_t value returned by ctoi() by more than 8 bits (undefined behaviour). Fix is to cast the result of ctoi() to uint64_t before doing the left shift.

Also note in the issue #157, the sample code has a bug were the pids var is a signed int, which will cause an error; it should be unsigned. See example program Check_PIDs_1_20.ino for a working version.

@PowerBroker2
Copy link
Owner

Awesome. Also, thank you so much for helping me fix up the loose ends of this library!

@PowerBroker2 PowerBroker2 merged commit cfced0c into PowerBroker2:master Dec 17, 2023
@jimwhitelaw jimwhitelaw deleted the fix-issue-157 branch December 17, 2023 15:58
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.

None yet

2 participants