drivers/sensor: lsm6ds0: Fix SENSOR_DEG2RAD_DOUBLE macro
In order to convert from degrees to radiants the SENSOR_DEG2RAD_DOUBLE macro must divide the argument by 180 degrees and multiply by PI radiants, and not the other way around. Please note that same macro is already defined in the correct way in other sensor drivers as well. (Fix #39483) Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
parent
20bdb6ee21
commit
aa3f3d943a
1 changed files with 1 additions and 1 deletions
|
@ -314,7 +314,7 @@
|
|||
|
||||
#define SENSOR_G_DOUBLE (SENSOR_G / 1000000.0)
|
||||
#define SENSOR_PI_DOUBLE (SENSOR_PI / 1000000.0)
|
||||
#define SENSOR_DEG2RAD_DOUBLE (180.0 / SENSOR_PI_DOUBLE)
|
||||
#define SENSOR_DEG2RAD_DOUBLE (SENSOR_PI_DOUBLE / 180)
|
||||
|
||||
#if defined(CONFIG_LSM6DS0_ACCEL_ENABLE_X_AXIS)
|
||||
#define LSM6DS0_ACCEL_ENABLE_X_AXIS 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue