mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 00:31:36 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user