mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 16:23:34 +08:00
drivers start using uORB message print instead of custom
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user