From d93f83e7aed2878df9f09d380c7696a93a838e3a Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Fri, 18 Sep 2015 15:09:35 +0200 Subject: [PATCH] correction for MPU6500 ident correction targets --- src/main/drivers/accgyro_spi_mpu6500.h | 3 ++- src/main/drivers/gyro_sync.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/drivers/accgyro_spi_mpu6500.h b/src/main/drivers/accgyro_spi_mpu6500.h index a2f8ad4ae0..6a6ec3e637 100755 --- a/src/main/drivers/accgyro_spi_mpu6500.h +++ b/src/main/drivers/accgyro_spi_mpu6500.h @@ -25,7 +25,8 @@ #define MPU6500_RA_ACCEL_CFG (0x1C) #define MPU6500_RA_LPF (0x1A) #define MPU6500_RA_RATE_DIV (0x19) -#define MPU6500_RA_INT_STATUS (0x38) +#define MPU6500_RA_INT_ENABLE (0x38) +#define MPU6500_RA_INT_STATUS (0x3A) #define MPU6500_WHO_AM_I_CONST (0x70) diff --git a/src/main/drivers/gyro_sync.c b/src/main/drivers/gyro_sync.c index 3bd72d53d8..08c848806c 100644 --- a/src/main/drivers/gyro_sync.c +++ b/src/main/drivers/gyro_sync.c @@ -48,7 +48,7 @@ void gyroUpdateSampleRate(uint32_t looptime, uint8_t lpf, uint8_t syncGyroToLoop int minLooptime; if (syncGyroToLoop) { -#if defined(SPRACINGF3) || defined(ALIENWIIF3) || defined(NAZE32PRO) || defined(STM32F3DISCOVERY) || defined(CHEBUZZF3) || defined(EUSTM32F103RC) || defined(PORT103R) || defined(MOTOLAB) +#if defined(SPRACINGF3) || defined(ALIENWIIF3) || defined(NAZE32PRO) || defined(STM32F3DISCOVERY) || defined(CHEBUZZF3) || defined(PORT103R) || defined(MOTOLAB) if (lpf == INV_FILTER_256HZ_NOLPF2) { gyroSamplePeriod = 125; @@ -74,7 +74,7 @@ void gyroUpdateSampleRate(uint32_t looptime, uint8_t lpf, uint8_t syncGyroToLoop gyroSamplePeriod = 1000; minLooptime = 1000; // Full sampling } -#elif defined(COLIBRI_RACE) +#elif defined(COLIBRI_RACE) || defined(EUSTM32F103RC) if (lpf == INV_FILTER_256HZ_NOLPF2) { gyroSamplePeriod = 125;