AP_AHRS: Reduce scope of AP_Baro.h

This commit is contained in:
Michael du Breuil 2019-06-26 19:37:09 -07:00 committed by Peter Barker
parent 1a7502b413
commit 1226eb825a
5 changed files with 9 additions and 4 deletions

View File

@ -19,6 +19,7 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_NMEA_Output/AP_NMEA_Output.h>
extern const AP_HAL::HAL& hal;
@ -503,6 +504,10 @@ void AP_AHRS::Log_Write_Home_And_Origin()
}
}
// get apparent to true airspeed ratio
float AP_AHRS::get_EAS2TAS(void) const {
return AP::baro().get_EAS2TAS();
}
void AP_AHRS::update_nmea_out()
{

View File

@ -26,7 +26,6 @@
#include <AP_Airspeed/AP_Airspeed.h>
#include <AP_Beacon/AP_Beacon.h>
#include <AP_InertialSensor/AP_InertialSensor.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_Param/AP_Param.h>
#include <AP_Common/Location.h>
@ -301,9 +300,7 @@ public:
}
// get apparent to true airspeed ratio
float get_EAS2TAS(void) const {
return AP::baro().get_EAS2TAS();
}
float get_EAS2TAS(void) const;
// return true if airspeed comes from an airspeed sensor, as
// opposed to an IMU estimate

View File

@ -24,6 +24,7 @@
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_Baro/AP_Baro.h>
extern const AP_HAL::HAL& hal;

View File

@ -25,6 +25,7 @@
#include <GCS_MAVLink/GCS.h>
#include <AP_Module/AP_Module.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_Baro/AP_Baro.h>
#if AP_AHRS_NAVEKF_AVAILABLE

View File

@ -9,6 +9,7 @@
#include <AP_RangeFinder/AP_RangeFinder.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_Baro/AP_Baro.h>
void setup();
void loop();