diff --git a/src/flight_imu.c b/src/flight_imu.c index c5b6904ff..09f415a97 100644 --- a/src/flight_imu.c +++ b/src/flight_imu.c @@ -44,7 +44,6 @@ float accVelScale; int16_t smallAngle = 0; -int32_t sonarAlt; // to think about the unit int32_t EstAlt; // in cm int32_t AltHold; int32_t errorAltitudeI = 0; diff --git a/src/sensors_sonar.c b/src/sensors_sonar.c index fbee59e1f..6e6d481bc 100644 --- a/src/sensors_sonar.c +++ b/src/sensors_sonar.c @@ -1,5 +1,15 @@ -#include "board.h" -#include "mw.h" +#include +#include + +#include "platform.h" + +#include "drivers/sonar_hcsr04.h" +#include "runtime_config.h" + +#include "sensors_common.h" +#include "sensors_sonar.h" + +int32_t sonarAlt; // to think about the unit #ifdef SONAR