mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-26 18:48:30 -04:00
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
82b8f4d7b7
commit
bd00b629e7
@ -244,11 +244,16 @@ 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_APM_HARDWARE == APM_HARDWARE_APM2
|
#if CONFIG_BARO == AP_BARO_MS5611
|
||||||
barometer.Init(1, true);
|
barometer.init();
|
||||||
#else
|
#elif CONFIG_BARO == AP_BARO_BMP085
|
||||||
barometer.Init(1, false);
|
# if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2
|
||||||
#endif // CONFIG_APM_HARDWARE
|
#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