diff --git a/AntennaTracker/AntennaTracker.pde b/AntennaTracker/AntennaTracker.pde index a79b0df0b6..4cf2c2b4b4 100644 --- a/AntennaTracker/AntennaTracker.pde +++ b/AntennaTracker/AntennaTracker.pde @@ -117,21 +117,7 @@ void gcs_send_text_fmt(const prog_char_t *fmt, ...); //////////////////////////////////////////////////////////////////////////////// static AP_GPS gps; -#if CONFIG_BARO == HAL_BARO_BMP085 -static AP_Baro_BMP085 barometer; -#elif CONFIG_BARO == HAL_BARO_PX4 -static AP_Baro_PX4 barometer; -#elif CONFIG_BARO == HAL_BARO_VRBRAIN -static AP_Baro_VRBRAIN barometer; -#elif CONFIG_BARO == HAL_BARO_HIL -static AP_Baro_HIL barometer; -#elif CONFIG_BARO == HAL_BARO_MS5611 -static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::i2c); -#elif CONFIG_BARO == HAL_BARO_MS5611_SPI -static AP_Baro_MS5611 barometer(&AP_Baro_MS5611::spi); -#else - #error Unrecognized CONFIG_BARO setting -#endif +static AP_Baro barometer; #if CONFIG_COMPASS == HAL_COMPASS_PX4 static AP_Compass_PX4 compass; diff --git a/AntennaTracker/sensors.pde b/AntennaTracker/sensors.pde index 0f35b210a7..55bc647c27 100644 --- a/AntennaTracker/sensors.pde +++ b/AntennaTracker/sensors.pde @@ -10,7 +10,7 @@ static void init_barometer(void) // read the barometer and return the updated altitude in meters static void update_barometer(void) { - barometer.read(); + barometer.update(); }