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

Provide a way to get meaningful data from the sensor #2

Closed
TheButlah opened this issue Dec 27, 2022 · 8 comments
Closed

Provide a way to get meaningful data from the sensor #2

TheButlah opened this issue Dec 27, 2022 · 8 comments

Comments

@TheButlah
Copy link
Contributor

the data returned is in i16 format. Without a way to access the sensor range, I can't convert this to a float.

@eldruin
Copy link
Owner

eldruin commented Jan 16, 2023

The sensor range will depend on the parameters that you have set.
You can have a look at the datasheet to see how to perform a conversion.
I would welcome code that does the scaling in this crate, though.
You can have a look here for an example.

@TheButlah
Copy link
Contributor Author

Once I implement it and test it in my code, I can implement a PR to add functionality for reading FSR

@thedevleon
Copy link

Once I implement it and test it in my code, I can implement a PR to add functionality for reading FSR

Any progress on this?

@TheButlah
Copy link
Contributor Author

Yes feel free to use the code - I haven't been working on this recently but yes it did seem to be working.

@TheButlah
Copy link
Contributor Author

From what I remember, the maintainer didn't want to bump the MSRV and I use plenty of const code in what you linked. So I didn't submit a PR at the time.

@eldruin
Copy link
Owner

eldruin commented Jun 27, 2023

As I said, please feel free to add support for that here.
Over in #1 I preferred to remove the const qualifier because it was just one trivial function.
Bumping the MSRV is fine.

@eldruin
Copy link
Owner

eldruin commented May 2, 2024

Fixed in #9 and published in 1.1.0.
Thanks everybody!

@eldruin eldruin closed this as completed May 2, 2024
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

No branches or pull requests

3 participants