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

[sensorfwd] Use float values for XYZ data. Fixes JB#60407 #10

Merged

Conversation

spiiroin
Copy link
Contributor

Accelerometer values have granularity of 1 mG even if underlying
sensors would report values with higher accuracy. This happens
implicitly due to internal to sensorfwd storage using integers
for storing xyz vectors.

Switch from integers to single precision floating point numbers.

Applications that use qtsensors API should work without any changes.

Applications that use sensors with xyz data over custom unix socket
io channel need to be adapted to data type change.

The parameters are not used on purpose.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
XYZ operator== is used only in unit test code. Due to taking also
timestamps into account it is "samples are exactly the same" rather
than "sample values are similar enough" type of test - which is
unlikely to be useful outside unit testing context.

Move the operator from public API header to where it is needed.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
Accelerometer values have granularity of 1 mG even if underlying
sensors would report values with higher accuracy. This happens
implicitly due to internal to sensorfwd storage using integers
for storing xyz vectors.

Switch from integers to single precision floating point numbers.

Applications that use qtsensors API should work without any changes.

Applications that use sensors with xyz data over custom unix socket
io channel need to be adapted to data type change.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
@spiiroin spiiroin force-pushed the jb60407_accelerometer_pass_through branch from 66d61b5 to 532fc4c Compare March 30, 2023 08:29
@spiiroin spiiroin merged commit 7569303 into sailfishos:master Mar 30, 2023
@spiiroin spiiroin deleted the jb60407_accelerometer_pass_through branch March 30, 2023 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants