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

Add functions to read raw IR channels 1 and 2 #47

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rafael-ottersberg
Copy link

Implements a function that reads the raw values from RAM and converts it, following the "sign-magnitude representation" according to the sensor's manual.

Solves issue #46.

@rafael-ottersberg
Copy link
Author

rafael-ottersberg commented Feb 1, 2024

0 is returned if the write_then_read() fails which comes from the read16() function. However, UINT16_MAX for read16() and INT16_MAX for readSignMag16() would be better than 0, as 0 is a valid value that could be encountered.

Is anything missing?

@rafael-ottersberg rafael-ottersberg marked this pull request as draft February 2, 2024 12:11
@rafael-ottersberg rafael-ottersberg marked this pull request as ready for review February 2, 2024 13:03
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.

1 participant