diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-19 13:56:28 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-20 09:14:13 +0200 |
commit | 5c44146c1bf516424aecb187a9c73f5d1b7518d7 (patch) | |
tree | b4b5be96fed519d05506361cd37287a1c93d763a /src/modules/sensors | |
parent | d8c91b9fbde6a55de9f89e4f385ca61039e37c0e (diff) | |
download | px4-firmware-5c44146c1bf516424aecb187a9c73f5d1b7518d7.tar.gz px4-firmware-5c44146c1bf516424aecb187a9c73f5d1b7518d7.tar.bz2 px4-firmware-5c44146c1bf516424aecb187a9c73f5d1b7518d7.zip |
sensors app: Be less verbose
Diffstat (limited to 'src/modules/sensors')
-rw-r--r-- | src/modules/sensors/sensors.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 09d717c16..3fc8627c1 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -1389,7 +1389,6 @@ Sensors::parameter_update_poll(bool forced) if (res) { warnx(CAL_FAILED_APPLY_CAL_MSG, "gyro", i); } else { - gyro_count++; config_ok = true; } } @@ -1397,11 +1396,11 @@ Sensors::parameter_update_poll(bool forced) } } - close(fd); - - if (!config_ok) { - warnx("NO CONFIG FOR GYRO #%u", s); + if (config_ok) { + gyro_count++; } + + close(fd); } /* run through all accel sensors */ @@ -1456,7 +1455,6 @@ Sensors::parameter_update_poll(bool forced) if (res) { warnx(CAL_FAILED_APPLY_CAL_MSG, "accel", i); } else { - accel_count++; config_ok = true; } } @@ -1464,11 +1462,11 @@ Sensors::parameter_update_poll(bool forced) } } - close(fd); - - if (!config_ok) { - warnx("NO CONFIG FOR ACCEL #%u", s); + if (config_ok) { + accel_count++; } + + close(fd); } /* run through all mag sensors */ @@ -1580,7 +1578,6 @@ Sensors::parameter_update_poll(bool forced) if (res) { warnx(CAL_FAILED_APPLY_CAL_MSG, "mag", i); } else { - mag_count++; config_ok = true; } } @@ -1588,11 +1585,11 @@ Sensors::parameter_update_poll(bool forced) } } - close(fd); - - if (!config_ok) { - warnx("NO CONFIG FOR MAG #%u", s); + if (config_ok) { + mag_count++; } + + close(fd); } int fd = open(AIRSPEED0_DEVICE_PATH, 0); @@ -1612,7 +1609,7 @@ Sensors::parameter_update_poll(bool forced) close(fd); } - warnx("config: %u gyros, %u mags, %u accels", gyro_count, mag_count, accel_count); + warnx("valid configs: %u gyros, %u mags, %u accels", gyro_count, mag_count, accel_count); } } |