drivers start using uORB message print instead of custom

This commit is contained in:
Daniel Agar
2018-03-28 09:15:41 -04:00
parent 3db17a04fc
commit 5fba1f38b2
33 changed files with 79 additions and 426 deletions
@@ -123,7 +123,8 @@ void LidarLitePWM::print_info()
perf_print_counter(_read_errors);
perf_print_counter(_sensor_zero_resets);
warnx("poll interval: %u ticks", getMeasureTicks());
warnx("distance: %.3fm", (double)_range.current_distance);
print_message(_range);
}
void LidarLitePWM::print_registers()
@@ -217,9 +217,7 @@ test()
return;
}
PX4_INFO("single read");
PX4_INFO("measurement: %0.2f m", (double)report.current_distance);
PX4_INFO("time: %lld", report.timestamp);
print_message(report);
/* start the sensor polling at 2Hz */
if (PX4_OK != px4_ioctl(fd, SENSORIOCSPOLLRATE, 2)) {
@@ -249,11 +247,7 @@ test()
return;
}
PX4_INFO("periodic read %u", i);
PX4_INFO("valid %u", (float)report.current_distance > report.min_distance
&& (float)report.current_distance < report.max_distance ? 1 : 0);
PX4_INFO("measurement: %0.3f m", (double)report.current_distance);
PX4_INFO("time: %lld", report.timestamp);
print_message(report);
}
/* reset the sensor polling to default rate */