Merge pull request #2236 from TSC21/drivers_cleanup

drivers: added validity check
This commit is contained in:
Lorenz Meier
2015-06-26 07:39:09 +02:00
4 changed files with 18 additions and 4 deletions
+2
View File
@@ -329,6 +329,8 @@ test(const bool use_i2c, const int bus)
}
warnx("periodic read %u", i);
warnx("valid %u", (float)report.current_distance > report.min_distance
&& (float)report.current_distance < report.max_distance ? 1 : 0);
warnx("measurement: %0.3f m", (double)report.current_distance);
warnx("time: %lld", report.timestamp);
}