ll40ls: first stab at adapting ll40ls to the new distance_sensor msg

This commit is contained in:
Ban Siesta
2015-05-24 15:59:29 +01:00
parent cf39e8c721
commit a729d6f301
5 changed files with 58 additions and 60 deletions
+3 -3
View File
@@ -239,7 +239,7 @@ void stop(const bool use_i2c, const int bus)
void
test(const bool use_i2c, const int bus)
{
struct range_finder_report report;
struct distance_sensor_s report;
ssize_t sz;
int ret;
@@ -266,7 +266,7 @@ test(const bool use_i2c, const int bus)
}
warnx("single read");
warnx("measurement: %0.2f m", (double)report.distance);
warnx("measurement: %0.2f m", (double)report.current_distance);
warnx("time: %lld", report.timestamp);
/* start the sensor polling at 2Hz */
@@ -295,7 +295,7 @@ test(const bool use_i2c, const int bus)
}
warnx("periodic read %u", i);
warnx("measurement: %0.3f m", (double)report.distance);
warnx("measurement: %0.3f m", (double)report.current_distance);
warnx("time: %lld", report.timestamp);
}