From f6bba74fb6a2dd6a039d58471c6cfe374367e9d5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 7 Jul 2014 09:49:38 +1000 Subject: [PATCH] Plane: enable MPU9250 for Linux build --- ArduPlane/ArduPlane.pde | 2 ++ ArduPlane/config.h | 2 +- ArduPlane/defines.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ArduPlane/ArduPlane.pde b/ArduPlane/ArduPlane.pde index 9a02e1053e..7b23beae4a 100644 --- a/ArduPlane/ArduPlane.pde +++ b/ArduPlane/ArduPlane.pde @@ -245,6 +245,8 @@ AP_InertialSensor_Oilpan ins( &apm1_adc ); AP_InertialSensor_Flymaple ins; #elif CONFIG_INS_TYPE == CONFIG_INS_L3G4200D AP_InertialSensor_L3G4200D ins; +#elif CONFIG_INS_TYPE == CONFIG_INS_MPU9250 +AP_InertialSensor_MPU9250 ins; #else #error Unrecognised CONFIG_INS_TYPE setting. #endif // CONFIG_INS_TYPE diff --git a/ArduPlane/config.h b/ArduPlane/config.h index 421cd16ae8..34005f5f64 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -112,7 +112,7 @@ #elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX # define BATTERY_VOLT_PIN -1 # define BATTERY_CURR_PIN -1 - # define CONFIG_INS_TYPE CONFIG_INS_MPU6000 + # define CONFIG_INS_TYPE CONFIG_INS_MPU9250 # define CONFIG_BARO AP_BARO_MS5611 # define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI # define CONFIG_COMPASS AP_COMPASS_HMC5843 diff --git a/ArduPlane/defines.h b/ArduPlane/defines.h index 33139a20ad..2b8fd79092 100644 --- a/ArduPlane/defines.h +++ b/ArduPlane/defines.h @@ -205,6 +205,7 @@ enum log_messages { #define CONFIG_INS_FLYMAPLE 5 #define CONFIG_INS_L3G4200D 6 #define CONFIG_INS_VRBRAIN 7 +#define CONFIG_INS_MPU9250 8 // barometer driver types #define AP_BARO_BMP085 1