diff --git a/sw/airborne/subsystems/imu.c b/sw/airborne/subsystems/imu.c index b41aeaa53f..c4d4bed7a0 100644 --- a/sw/airborne/subsystems/imu.c +++ b/sw/airborne/subsystems/imu.c @@ -32,6 +32,7 @@ void imu_init(void) { /* initialises neutrals */ RATES_ASSIGN(imu.gyro_neutral, IMU_GYRO_P_NEUTRAL, IMU_GYRO_Q_NEUTRAL, IMU_GYRO_R_NEUTRAL); VECT3_ASSIGN(imu.accel_neutral, IMU_ACCEL_X_NEUTRAL, IMU_ACCEL_Y_NEUTRAL, IMU_ACCEL_Z_NEUTRAL); + //FIXME should not assume that every imu has a mag and this id defined? VECT3_ASSIGN(imu.mag_neutral, IMU_MAG_X_NEUTRAL, IMU_MAG_Y_NEUTRAL, IMU_MAG_Z_NEUTRAL); /* diff --git a/sw/airborne/subsystems/imu.h b/sw/airborne/subsystems/imu.h index cffa2b6f4a..57d1c4135c 100644 --- a/sw/airborne/subsystems/imu.h +++ b/sw/airborne/subsystems/imu.h @@ -26,6 +26,7 @@ #include "math/pprz_algebra_int.h" #include "math/pprz_algebra_float.h" +#include "generated/airframe.h" /* must be defined by underlying hardware */ extern void imu_impl_init(void); diff --git a/sw/airborne/subsystems/imu/imu_analog.c b/sw/airborne/subsystems/imu/imu_analog.c index 0e9b0230e8..c5a0fd5452 100644 --- a/sw/airborne/subsystems/imu/imu_analog.c +++ b/sw/airborne/subsystems/imu/imu_analog.c @@ -22,9 +22,7 @@ */ #include "imu_analog.h" -#include "generated/airframe.h" #include "mcu_periph/adc.h" -#include "subsystems/imu.h" #include "mcu_periph/uart.h" volatile bool_t analog_imu_available; diff --git a/sw/airborne/subsystems/imu/imu_analog.h b/sw/airborne/subsystems/imu/imu_analog.h index 2d25688c50..c5a12413d1 100644 --- a/sw/airborne/subsystems/imu/imu_analog.h +++ b/sw/airborne/subsystems/imu/imu_analog.h @@ -46,7 +46,7 @@ extern volatile bool_t analog_imu_available; } #define ImuMagEvent(_mag_handler) { \ - if (false) { \ + if (0) { \ _mag_handler(); \ } \ }