diff --git a/flight/Modules/Sensors/sensors.c b/flight/Modules/Sensors/sensors.c index 425b73b44..43c8f8727 100644 --- a/flight/Modules/Sensors/sensors.c +++ b/flight/Modules/Sensors/sensors.c @@ -163,8 +163,6 @@ static void SensorsTask(void *parameters) gyro_test = PIOS_MPU6000_Test(); #elif defined(PIOS_INCLUDE_L3GD20) gyro_test = PIOS_L3GD20_Test(); -#else -#error No gyro defined #endif mag_test = PIOS_HMC5883_Test(); @@ -263,7 +261,10 @@ static void SensorsTask(void *parameters) gyro_scaling = PIOS_L3GD20_GetScale(); #else -#error No gyro defined +//#error No gyro defined + struct gyro_data {float x; float y; float z; float temperature;} gyro; + gyro_scaling = 0; + gyro_samples = 1; #endif float accels[3] = {(float) accel_accum[1] / accel_samples, (float) accel_accum[0] / accel_samples, -(float) accel_accum[2] / accel_samples}; diff --git a/flight/Revolution/System/inc/pios_config.h b/flight/Revolution/System/inc/pios_config.h index ff870f8cc..3e954e115 100644 --- a/flight/Revolution/System/inc/pios_config.h +++ b/flight/Revolution/System/inc/pios_config.h @@ -59,7 +59,7 @@ #define PIOS_INCLUDE_HMC5883 //#define PIOS_INCLUDE_MPU6000 //#define PIOS_MPU6000_ACCEL -#define PIOS_INCLUDE_L3GD20 +//#define PIOS_INCLUDE_L3GD20 #define PIOS_INCLUDE_MS5611 //#define PIOS_INCLUDE_HCSR04 diff --git a/flight/Revolution/System/pios_board.c b/flight/Revolution/System/pios_board.c index 1bc6af99d..888e7319d 100644 --- a/flight/Revolution/System/pios_board.c +++ b/flight/Revolution/System/pios_board.c @@ -1671,6 +1671,7 @@ void PIOS_Board_Init(void) { PIOS_DELAY_WaitmS(500); +/* #if defined(PIOS_INCLUDE_MPU6000) PIOS_MPU6000_Attach(pios_spi_gyro_id); PIOS_MPU6000_Init(&pios_mpu6000_cfg); @@ -1680,7 +1681,7 @@ void PIOS_Board_Init(void) { #else PIOS_Assert(0); #endif - +*/ PIOS_BMA180_Attach(pios_spi_accel_id); PIOS_BMA180_Init(&pios_bma180_cfg);