WIP: initial support for fixed-point data for sensors#17408
Draft
raiden00pl wants to merge 7 commits intoapache:masterfrom
Draft
WIP: initial support for fixed-point data for sensors#17408raiden00pl wants to merge 7 commits intoapache:masterfrom
raiden00pl wants to merge 7 commits intoapache:masterfrom
Conversation
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 <raiden00@railab.me>
support for fixed-point data for bmp280_uorb Signed-off-by: raiden00pl <raiden00@railab.me>
support for fixed-point data for bmp180_uorb Signed-off-by: raiden00pl <raiden00@railab.me>
support for fixed-point data for hyt271_uorb Signed-off-by: raiden00pl <raiden00@railab.me>
support for fixed-point data for adxl362_uorb Signed-off-by: raiden00pl <raiden00@railab.me>
0404a32 to
dde5a82
Compare
support for fixed-point data for adxl372_uorb Signed-off-by: raiden00pl <raiden00@railab.me>
support for fixed-point data for bh1749nuc_uorb Signed-off-by: raiden00pl <raiden00@railab.me>
linguini1
reviewed
Dec 3, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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