Skip to content

Commit

Permalink
sensors: initialize adc only if BOARD_NUMBER_BRICKS > 0
Browse files Browse the repository at this point in the history
Fixes the SITL startup error:
ERROR [sensors] no ADC found: /dev/adc0 (9)

Introduced in 8404889
  • Loading branch information
bkueng authored and LorenzMeier committed Jun 13, 2018
1 parent 08064c2 commit 226d7c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/sensors/sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 226d7c7

Please sign in to comment.