Skip to content

Conversation

@teburd
Copy link
Contributor

@teburd teburd commented Jul 16, 2024

There were code paths that could have lead to divide by zero given an invalid scale setting for accel or gyro. In practice this should be an invalid setup even before getting to these conversion functions. The conversion functions now better show all valid values are accounted for by using CODE_UNREACHABLE in the default case.

Fixes #75256
Fixes #75257

There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.

Signed-off-by: Tom Burdick <[email protected]>
@teburd teburd added this to the v4.0.0 milestone Jul 16, 2024
@bperseghetti
Copy link
Member

@teburd do we want to maybe pull this into #75187 ?

@teburd teburd marked this pull request as ready for review July 19, 2024 02:15
@zephyrbot zephyrbot added the area: Sensors Sensors label Jul 19, 2024
@teburd
Copy link
Contributor Author

teburd commented Jul 19, 2024

@teburd do we want to maybe pull this into #75187 ?

Doesn't seem like it needs to be bundled in with it no

@nashif nashif added the backport v3.7-branch Request backport to the v3.7-branch label Jul 27, 2024
@nashif nashif merged commit 5474b61 into zephyrproject-rtos:main Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Sensors Sensors backport v3.7-branch Request backport to the v3.7-branch

Projects

None yet

6 participants