forked from Archive/PX4-Autopilot
lis2mdl: reduce update rate from 50Hz to 20Hz to reduce spikes
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
d985887468
commit
4ed3ecea41
|
@ -50,8 +50,8 @@
|
||||||
* LIS2MDL internal constants and data structures.
|
* LIS2MDL internal constants and data structures.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Max measurement rate is 50Hz */
|
/* Max measurement rate is 20Hz */
|
||||||
#define LIS2MDL_CONVERSION_INTERVAL (1000000 / 50)
|
#define LIS2MDL_CONVERSION_INTERVAL (1000000 / 20)
|
||||||
|
|
||||||
#define ADDR_WHO_AM_I 0x4f
|
#define ADDR_WHO_AM_I 0x4f
|
||||||
#define ID_WHO_AM_I 0x40
|
#define ID_WHO_AM_I 0x40
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
#define ADDR_OUT_T_H 0x6f
|
#define ADDR_OUT_T_H 0x6f
|
||||||
|
|
||||||
#define CFG_REG_A_TEMP_COMP_EN (1 << 7)
|
#define CFG_REG_A_TEMP_COMP_EN (1 << 7)
|
||||||
#define CFG_REG_A_ODR (2 << 2) /* 50Hz (100Hz creates spikes randomly) */
|
#define CFG_REG_A_ODR (1 << 2) /* 20Hz (100Hz or 50Hz creates spikes randomly) */
|
||||||
#define CFG_REG_A_MD (0 << 0) /* continuous mode */
|
#define CFG_REG_A_MD (0 << 0) /* continuous mode */
|
||||||
|
|
||||||
#define CFG_REG_B_LPF (1 << 0) /* LPF */
|
#define CFG_REG_B_LPF (1 << 0) /* LPF */
|
||||||
|
|
Loading…
Reference in New Issue