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

Update pH unit decimals to 3 #2306

Merged
merged 1 commit into from
Jul 19, 2020

Conversation

ruimarinho
Copy link
Contributor

This PR brings back pH unit decimals to 3 (as opposed to 0). In the future it might may sense to make these configurable as different probes will have different resolutions. Right now, the Atlas Scientific pH Probes come with 0.001 resolution.

@mcspr
Copy link
Collaborator

mcspr commented Jul 19, 2020

Sensor can have signed char decimals(sensor::Unit unit) override { switch (unit) { ... } }.

Kind of the same issue as UVI, it's not technically a unit. I wonder if decimals / etc. configuration should work with pairs of magnitude + unit.
edit: or, provide 'dimension-less' unit with some custom resolution, since None effectively does not have any

@mcspr mcspr merged commit ea111c4 into xoseperez:dev Jul 19, 2020
@ruimarinho ruimarinho deleted the bugfix/magnitude-ph-decimals branch July 19, 2020 21:23
@ruimarinho
Copy link
Contributor Author

I like the idea of a dimension-less unit and it would be up to the sensor to return the resolution override.

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