Skip to content

Error code getting masked out #13

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

Closed
caternuson opened this issue Aug 25, 2022 · 1 comment · Fixed by #14
Closed

Error code getting masked out #13

caternuson opened this issue Aug 25, 2022 · 1 comment · Fixed by #14
Labels
good first issue Good for newcomers

Comments

@caternuson
Copy link
Collaborator

This is a minor big. The mask here should be removed:

raise RuntimeError("SI1145 Error: 0x{:02x}".format(response & 0xF0))

Masking the upper 4 bits is useful to detect if there is an error. But the actual error is then coded into the lower 4 bits. So the print should just not mask anything and print the whole response value.
image

@caternuson caternuson added the good first issue Good for newcomers label Aug 25, 2022
@sokratisvas
Copy link
Contributor

I would like to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants