Skip to content

Commit

Permalink
[imu_umarim] configurable gyro lowpass and output rate
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Feb 10, 2013
1 parent 87bb104 commit 4dd3f12
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions sw/airborne/boards/umarim/imu_umarim.c
Expand Up @@ -48,6 +48,16 @@
#endif
PRINT_CONFIG_VAR(UMARIM_ACCEL_RATE)


/* default gyro internal lowpass frequency and sample rate divider */
#if !defined UMARIM_GYRO_LOWPASS && !defined UMARIM_GYRO_SMPLRT_DIV
#define UMARIM_GYRO_LOWPASS ITG3200_DLPF_20HZ
#define UMARIM_GYRO_SMPLRT_DIV 19
INFO("Gyro output rate is 50Hz")
#endif
PRINT_CONFIG_VAR(UMARIM_GYRO_LOWPASS)
PRINT_CONFIG_VAR(UMARIM_GYRO_SMPLRT_DIV)

struct ImuUmarim imu_umarim;

void imu_impl_init(void)
Expand All @@ -56,8 +66,8 @@ void imu_impl_init(void)
// ITG3200
itg3200_init(&imu_umarim.itg, &(IMU_UMARIM_I2C_DEV), ITG3200_ADDR_ALT);
// change the default configuration
imu_umarim.itg.config.smplrt_div = 19;
imu_umarim.itg.config.dlpf_cfg = ITG3200_DLPF_20HZ;
imu_umarim.itg.config.smplrt_div = UMARIM_GYRO_SMPLRT_DIV;
imu_umarim.itg.config.dlpf_cfg = UMARIM_GYRO_LOWPASS;

/////////////////////////////////////////////////////////////////////
// ADXL345
Expand Down

0 comments on commit 4dd3f12

Please sign in to comment.