-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add support for service $23 - read memory by address #114
Conversation
This sounds very promising! This is just to let you know that the PR has been noticed, and I aim to review the proposed changes soon 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all, this PR looks great 🎉🥇 And I am very, very happy to see the bugfix in iso14229_1.py
! 💪
I took the liberty of making three additional commits:
- Small formatting changes (for PEP 8 compliance)
- Implemented the NRC lookup to human readable form for applicable values defined for ReadMemoryByAddress in the ISO 14229 standard, as suggested in your TODO comment
- Broke out a magic number (
0x63
) for the service response ID, to make the code easier to read
If you think this looks good, I will be happy to merge the PR 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very happy to see this bug caught and fixed 😅 Excellent!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a relevant test along with the code - this is very appreciated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i love this commit! i think long term we should move this to a function/method and then anytime we get a negative response, i.e. in other UDS functions, we use it to inform the user what the decoded NRC is in the error message. but this is a great start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
FYI: I had a closer look at your suggestion and it turns out there was already a dict for |
This is basically a rewrite of #79 but only focusing on the memory read code. I fixed it up and isolated the changes as discussed in that PR. I've used it extensively against real modules and it works great.