diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-06 12:36:46 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-06 12:36:46 +0100 |
commit | c94076f6735290dc7aa8742428f46ef51521f9a6 (patch) | |
tree | e502109f26362659727d54b0f8214e77f57a092a | |
parent | 309980cd4d773e5c2bd6bab2f1c181243f8acd8f (diff) | |
download | px4-firmware-c94076f6735290dc7aa8742428f46ef51521f9a6.tar.gz px4-firmware-c94076f6735290dc7aa8742428f46ef51521f9a6.tar.bz2 px4-firmware-c94076f6735290dc7aa8742428f46ef51521f9a6.zip |
Added missing ADC start command, fixed return value / error behavior of ADC init
-rw-r--r-- | ROMFS/scripts/rc.sensors | 1 | ||||
-rw-r--r-- | apps/sensors/sensors.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ROMFS/scripts/rc.sensors b/ROMFS/scripts/rc.sensors index 536fcfd2c..42c2f52e9 100644 --- a/ROMFS/scripts/rc.sensors +++ b/ROMFS/scripts/rc.sensors @@ -8,6 +8,7 @@ # ms5611 start +adc start if mpu6000 start then diff --git a/apps/sensors/sensors.cpp b/apps/sensors/sensors.cpp index 55786333f..c099509a7 100644 --- a/apps/sensors/sensors.cpp +++ b/apps/sensors/sensors.cpp @@ -640,8 +640,8 @@ Sensors::adc_init() _fd_adc = open("/dev/adc0", O_RDONLY | O_NONBLOCK); if (_fd_adc < 0) { - warn("/dev/adc0"); - errx(1, "FATAL: no ADC found"); + warnx("/dev/adc0"); + warnx(1, "FATAL: no ADC found"); } } |