mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
Code to disable all gyros. All modules now running.
This commit is contained in:
parent
5ee9c8008e
commit
0fbcf7723d
@ -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};
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user