mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
ArduCopter: update AP_Baro constructors & initializers
This commit is contained in:
parent
f4aaa56b16
commit
a48c65b5b5
@ -160,11 +160,15 @@ static AP_Int8 *flight_modes = &g.flight_mode1;
|
|||||||
AP_Compass_HIL compass;
|
AP_Compass_HIL compass;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if CONFIG_BARO == AP_BARO_BMP085
|
#if CONFIG_BARO == AP_BARO_BMP085
|
||||||
AP_Baro_BMP085 barometer;
|
# if CONFIG_HARDWARE == CONFIG_HARDWARE_APM2
|
||||||
#elif CONFIG_BARO == AP_BARO_MS5611
|
AP_Baro_BMP085 barometer(true);
|
||||||
|
# else
|
||||||
|
AP_Baro_BMP085 barometer(false);
|
||||||
|
# endif
|
||||||
|
#elif CONFIG_BARO == AP_BARO_MS5611
|
||||||
AP_Baro_MS5611 barometer;
|
AP_Baro_MS5611 barometer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AP_Compass_HMC5843 compass(Parameters::k_param_compass);
|
AP_Compass_HMC5843 compass(Parameters::k_param_compass);
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,16 +250,7 @@ static void init_ardupilot()
|
|||||||
adc.Init(&timer_scheduler); // APM ADC library initialization
|
adc.Init(&timer_scheduler); // APM ADC library initialization
|
||||||
#endif // CONFIG_ADC
|
#endif // CONFIG_ADC
|
||||||
|
|
||||||
#if CONFIG_BARO == AP_BARO_MS5611
|
barometer.init(&timer_scheduler);
|
||||||
barometer.init();
|
|
||||||
#elif CONFIG_BARO == AP_BARO_BMP085
|
|
||||||
# if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2
|
|
||||||
#warning bmp085 for apm2
|
|
||||||
barometer.init(1, true);
|
|
||||||
# else
|
|
||||||
barometer.init(1, false);
|
|
||||||
# endif // CONFIG_APM_HARDWARE
|
|
||||||
#endif // CONFIG_BARO
|
|
||||||
|
|
||||||
#endif // HIL_MODE
|
#endif // HIL_MODE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user