sensors: initialize adc only if BOARD_NUMBER_BRICKS > 0

Fixes the SITL startup error:
ERROR [sensors] no ADC found: /dev/adc0 (9)

Introduced in 8404889098
This commit is contained in:
Beat Küng 2018-06-13 14:14:20 +02:00 committed by Lorenz Meier
parent 08064c2b71
commit 226d7c79da
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,7 @@ void
Sensors::run()
{
if (!_hil_enabled) {
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_BEBOP)
#if !defined(__PX4_QURT) && BOARD_NUMBER_BRICKS > 0
adc_init();
#endif
}