-
Notifications
You must be signed in to change notification settings - Fork 1.4k
WIP: initial support for fixed-point data for sensors #17408
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
Draft
raiden00pl
wants to merge
7
commits into
apache:master
Choose a base branch
from
raiden00pl:sensors_fixedmath
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+538
−221
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4dfeb92 to
8cd1558
Compare
acassis
reviewed
Nov 29, 2025
5fdb41a to
329d6ff
Compare
329d6ff to
633521b
Compare
new sensor framework can now select between float data type and fixed-point data type Signed-off-by: raiden00pl <[email protected]>
support for fixed-point data for bmp280_uorb Signed-off-by: raiden00pl <[email protected]>
support for fixed-point data for bmp180_uorb Signed-off-by: raiden00pl <[email protected]>
support for fixed-point data for hyt271_uorb Signed-off-by: raiden00pl <[email protected]>
support for fixed-point data for adxl362_uorb Signed-off-by: raiden00pl <[email protected]>
0404a32 to
dde5a82
Compare
support for fixed-point data for adxl372_uorb Signed-off-by: raiden00pl <[email protected]>
support for fixed-point data for bh1749nuc_uorb Signed-off-by: raiden00pl <[email protected]>
linguini1
reviewed
Dec 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: Documentation
Improvements or additions to documentation
Area: OS Components
OS Components issues
Area: Sensors
Sensors issues
Size: L
The size of the change in this PR is large
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
WIP code for fixed-math data type for sensors.
All sensor math operations will require modification to use
sensor_data_xxxmacros.At the moment, no sensor is modified to handle this properly. I'll probably choose the easiest sensor to port with a small amount of math operations to provide PoC.
EDIT: ported
bmp280_uorbto fixed-math, probably the easiest one :)Ultimately, all sensor units must be checked to see if the data unit make sense for the b16_t type.
Doing this work all at once is a lot of work which I don't want to do, so I suggest introducing this change gradually:
depends on SENSORS_USE_FLOATImpact
Testing