diff --git a/src/board.h b/src/board.h index 82e2ff5de..8132f8b84 100755 --- a/src/board.h +++ b/src/board.h @@ -130,10 +130,8 @@ typedef struct baro_t #define SENSORS_SET (SENSOR_ACC) -#endif - -#ifdef NAZE - // Afroflight32 +#else +// Afroflight32 #define LED0_GPIO GPIOB #define LED0_PIN GPIO_Pin_3 // PB3 (LED) #define LED1_GPIO GPIOB @@ -196,9 +194,7 @@ typedef struct baro_t #include "drv_l3g4200d.h" #include "drv_pwm.h" #include "drv_uart.h" -#endif - -#ifdef NAZE +#else // AfroFlight32 #include "drv_system.h" // timers, delays, etc #include "drv_adc.h" diff --git a/src/main.c b/src/main.c index 6e1d4d47e..c5da304bf 100755 --- a/src/main.c +++ b/src/main.c @@ -57,7 +57,7 @@ int main(void) adcInit(&adc_params); - // We have these sensors + // We have these sensors; SENSORS_SET defined in board.h depending on hardware platform sensorsSet(SENSORS_SET); mixerInit(); // this will set useServo var depending on mixer type diff --git a/src/sensors.c b/src/sensors.c index b30a91088..56504180f 100755 --- a/src/sensors.c +++ b/src/sensors.c @@ -59,7 +59,7 @@ retry: if (mcfg.acc_hardware == ACC_ADXL345) break; ; // fallthrough - case 2: // MPU6050 + case 2: // MPU6050 if (haveMpu6k) { mpu6050Detect(&acc, &gyro, mcfg.gyro_lpf, &mcfg.mpu6050_scale); // yes, i'm rerunning it again. re-fill acc struct accHardware = ACC_MPU6050; @@ -67,8 +67,8 @@ retry: break; } ; // fallthrough -#ifndef OLIMEXINO case 3: // MMA8452 +#ifndef OLIMEXINO if (mma8452Detect(&acc)) { accHardware = ACC_MMA8452; if (mcfg.acc_hardware == ACC_MMA8452) @@ -289,7 +289,7 @@ int Baro_update(void) return 0; baroDeadline = currentTime; - + if (state) { baro.get_up(); baro.start_ut(); @@ -476,7 +476,7 @@ int Mag_getADC(void) writeEEPROM(1, true); } } - + return 1; } #endif