diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-01 13:02:20 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-01 13:02:20 +0100 |
commit | 7ccc57f3c0c5616347f42a41ae06fc17486ac49e (patch) | |
tree | 18f97643473d5619eb0b509b357b098dd74c864b /apps/px4/tests/test_adc.c | |
parent | e137d004243f29520edce69c75be7abbe13fdf10 (diff) | |
download | px4-firmware-7ccc57f3c0c5616347f42a41ae06fc17486ac49e.tar.gz px4-firmware-7ccc57f3c0c5616347f42a41ae06fc17486ac49e.tar.bz2 px4-firmware-7ccc57f3c0c5616347f42a41ae06fc17486ac49e.zip |
Fixed test outputs, decoupled tests from NuttX low-level output via message() macro
Diffstat (limited to 'apps/px4/tests/test_adc.c')
-rw-r--r-- | apps/px4/tests/test_adc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/px4/tests/test_adc.c b/apps/px4/tests/test_adc.c index 4c021303f..030ac6e23 100644 --- a/apps/px4/tests/test_adc.c +++ b/apps/px4/tests/test_adc.c @@ -60,8 +60,10 @@ int test_adc(int argc, char *argv[]) { int fd = open(ADC_DEVICE_PATH, O_RDONLY); - if (fd < 0) - err(1, "can't open ADC device"); + if (fd < 0) { + warnx("ERROR: can't open ADC device"); + return 1; + } for (unsigned i = 0; i < 5; i++) { /* make space for a maximum of eight channels */ @@ -82,7 +84,7 @@ int test_adc(int argc, char *argv[]) usleep(150000); } - message("\t ADC test successful.\n"); + warnx("\t ADC test successful.\n"); errout_with_dev: |