ArduCopter Init: different call to barometer.init based on CONFIG_BARO
* BMP085 has two arguments, second varying on apm1/apm2 * ms5611 has no arguments
This commit is contained in:
parent
b055aa6f81
commit
39fe9075d9
@ -244,11 +244,16 @@ static void init_ardupilot()
|
||||
adc.Init(&timer_scheduler); // APM ADC library initialization
|
||||
#endif // CONFIG_ADC
|
||||
|
||||
#if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2
|
||||
barometer.Init(1, true);
|
||||
#else
|
||||
barometer.Init(1, false);
|
||||
#endif // CONFIG_APM_HARDWARE
|
||||
#if CONFIG_BARO == AP_BARO_MS5611
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user