mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 03:03:34 +08:00
drivers start using uORB message print instead of custom
This commit is contained in:
@@ -1965,15 +1965,7 @@ test()
|
||||
err(1, "immediate read failed");
|
||||
}
|
||||
|
||||
|
||||
warnx("accel x: \t% 9.5f\tm/s^2", (double)accel_report.x);
|
||||
warnx("accel y: \t% 9.5f\tm/s^2", (double)accel_report.y);
|
||||
warnx("accel z: \t% 9.5f\tm/s^2", (double)accel_report.z);
|
||||
warnx("accel x: \t%d\traw", (int)accel_report.x_raw);
|
||||
warnx("accel y: \t%d\traw", (int)accel_report.y_raw);
|
||||
warnx("accel z: \t%d\traw", (int)accel_report.z_raw);
|
||||
|
||||
warnx("accel range: %8.4f m/s^2", (double)accel_report.range_m_s2);
|
||||
print_message(accel_report);
|
||||
|
||||
int fd_mag = -1;
|
||||
struct mag_report m_report;
|
||||
@@ -1999,13 +1991,7 @@ test()
|
||||
err(1, "immediate read failed");
|
||||
}
|
||||
|
||||
warnx("mag x: \t% 9.5f\tga", (double)m_report.x);
|
||||
warnx("mag y: \t% 9.5f\tga", (double)m_report.y);
|
||||
warnx("mag z: \t% 9.5f\tga", (double)m_report.z);
|
||||
warnx("mag x: \t%d\traw", (int)m_report.x_raw);
|
||||
warnx("mag y: \t%d\traw", (int)m_report.y_raw);
|
||||
warnx("mag z: \t%d\traw", (int)m_report.z_raw);
|
||||
warnx("mag range: %8.4f ga", (double)m_report.range_ga);
|
||||
print_message(m_report);
|
||||
|
||||
/* reset to default polling */
|
||||
if (ioctl(fd_accel, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user