mirror of https://github.com/ArduPilot/ardupilot
ArduCopter: instantiate correct AP_Baro object based on CONFIG_BARO
This commit is contained in:
parent
1bfab64543
commit
b055aa6f81
|
@ -159,7 +159,13 @@ static AP_Int8 *flight_modes = &g.flight_mode1;
|
|||
AP_Baro_BMP085_HIL barometer;
|
||||
AP_Compass_HIL compass;
|
||||
#else
|
||||
AP_Baro_BMP085 barometer;
|
||||
|
||||
#if CONFIG_BARO == AP_BARO_BMP085
|
||||
AP_Baro_BMP085 barometer;
|
||||
#elif CONFIG_BARO == AP_BARO_MS5611
|
||||
AP_Baro_MS5611 barometer;
|
||||
#endif
|
||||
|
||||
AP_Compass_HMC5843 compass(Parameters::k_param_compass);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue