cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dsl_reg.h possible error ?

Eyal Lasko
Associate II
Posted on April 01, 2018 at 17:28

Hi, 

When using lsm6dsl_reg driver files I've stumbled on the following angular velocity conversion macros.

The math seems wrong... 

Can ST verify this?

Thanks

#lsm6dsl_reg
1 REPLY 1
Miroslav BATEK
ST Employee
Posted on April 04, 2018 at 17:36

You are right, there is a mistake.

It should be following:

#define LSM6DSL_FROM_FS_125dps_TO_mdps(lsb)    (float)(lsb *

 

4375.0f

) / 1000.0f

#define LSM6DSL_FROM_FS_250dps_TO_mdps(lsb)    (float)(lsb *

 

875

0

.0f

) / 1000.0f

#define LSM6DSL_FROM_FS_500dps_TO_mdps(lsb)    (float)(lsb * 1750

0

.0f

) / 1000.0f

#define LSM6DSL_FROM_FS_1000dps_TO_mdps(lsb)   (float)(lsb *  

35.0f)

#define LSM6DSL_FROM_FS_2000dps_TO_mdps(lsb)   (float)(lsb *  

70.0f)

We will fix it asap.