mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 18:03:34 +08:00
drivers start using uORB message print instead of custom
This commit is contained in:
@@ -595,11 +595,10 @@ BMP280::print_info()
|
||||
perf_print_counter(_sample_perf);
|
||||
perf_print_counter(_comms_errors);
|
||||
printf("poll interval: %u us \n", _report_ticks * USEC_PER_TICK);
|
||||
_reports->print_info("report queue");
|
||||
printf("P Pa: %.3f\n", (double)_P);
|
||||
printf("T: %.3f\n", (double)_T);
|
||||
printf("MSL pressure Pa: %u\n", _msl_pressure);
|
||||
|
||||
sensor_baro_s brp = {};
|
||||
_reports->get(&brp);
|
||||
print_message(brp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -778,11 +777,7 @@ test(enum BMP280_BUS busid)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
PX4_WARN("single read");
|
||||
PX4_WARN("pressure: %10.4f", (double)report.pressure);
|
||||
PX4_WARN("altitude: %11.4f", (double)report.altitude);
|
||||
PX4_WARN("temperature: %8.4f", (double)report.temperature);
|
||||
PX4_WARN("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
|
||||
/* set the queue depth to 10 */
|
||||
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10)) {
|
||||
@@ -818,11 +813,7 @@ test(enum BMP280_BUS busid)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
PX4_WARN("periodic read %u", i);
|
||||
PX4_WARN("pressure: %10.4f", (double)report.pressure);
|
||||
PX4_WARN("altitude: %11.4f", (double)report.altitude);
|
||||
PX4_WARN("temperature K: %8.4f", (double)report.temperature);
|
||||
PX4_WARN("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
@@ -799,9 +799,7 @@ LPS25H::print_info()
|
||||
perf_print_counter(_sample_perf);
|
||||
perf_print_counter(_comms_errors);
|
||||
printf("poll interval: %u ticks\n", _measure_ticks);
|
||||
printf("pressure %.2f\n", (double)_last_report.pressure);
|
||||
printf("altitude: %.2f\n", (double)_last_report.altitude);
|
||||
printf("temperature %.2f\n", (double)_last_report.temperature);
|
||||
print_message(_last_report);
|
||||
|
||||
_reports->print_info("report queue");
|
||||
}
|
||||
@@ -959,11 +957,7 @@ test(enum LPS25H_BUS busid)
|
||||
err(1, "immediate read failed");
|
||||
}
|
||||
|
||||
warnx("single read");
|
||||
warnx("pressure: %10.4f", (double)report.pressure);
|
||||
warnx("altitude: %11.4f", (double)report.altitude);
|
||||
warnx("temperature: %8.4f", (double)report.temperature);
|
||||
warnx("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
|
||||
/* set the queue depth to 10 */
|
||||
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10)) {
|
||||
@@ -995,11 +989,7 @@ test(enum LPS25H_BUS busid)
|
||||
err(1, "periodic read failed");
|
||||
}
|
||||
|
||||
warnx("periodic read %u", i);
|
||||
warnx("pressure: %10.4f", (double)report.pressure);
|
||||
warnx("altitude: %11.4f", (double)report.altitude);
|
||||
warnx("temperature K: %8.4f", (double)report.temperature);
|
||||
warnx("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
@@ -732,10 +732,10 @@ MPL3115A2::print_info()
|
||||
perf_print_counter(_comms_errors);
|
||||
printf("poll interval: %u ticks\n", _measure_ticks);
|
||||
_reports->print_info("report queue");
|
||||
printf("device: mpl3115a2\n");
|
||||
printf("P: %.3f\n", (double)_P);
|
||||
printf("T: %.3f\n", (double)_T);
|
||||
printf("MSL pressure: %10.4f\n", (double)(_msl_pressure / 100.f));
|
||||
|
||||
sensor_baro_s brp = {};
|
||||
_reports->get(&brp);
|
||||
print_message(brp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -899,11 +899,7 @@ test(enum MPL3115A2_BUS busid)
|
||||
err(1, "immediate read failed");
|
||||
}
|
||||
|
||||
warnx("single read");
|
||||
warnx("pressure: %10.4f", (double)report.pressure);
|
||||
warnx("altitude: %11.4f", (double)report.altitude);
|
||||
warnx("temperature: %8.4f", (double)report.temperature);
|
||||
warnx("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
|
||||
/* set the queue depth to 10 */
|
||||
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10)) {
|
||||
@@ -935,11 +931,7 @@ test(enum MPL3115A2_BUS busid)
|
||||
err(1, "periodic read failed");
|
||||
}
|
||||
|
||||
warnx("periodic read %u", i);
|
||||
warnx("pressure: %10.4f", (double)report.pressure);
|
||||
warnx("altitude: %11.4f", (double)report.altitude);
|
||||
warnx("temperature: %8.4f", (double)report.temperature);
|
||||
warnx("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
@@ -895,9 +895,6 @@ MS5611::print_info()
|
||||
printf("TEMP: %d\n", _TEMP);
|
||||
printf("SENS: %lld\n", _SENS);
|
||||
printf("OFF: %lld\n", _OFF);
|
||||
printf("P: %.3f\n", (double)_P);
|
||||
printf("T: %.3f\n", (double)_T);
|
||||
printf("MSL pressure: %10.4f\n", (double)(_msl_pressure / 100.f));
|
||||
|
||||
printf("factory_setup %u\n", _prom.factory_setup);
|
||||
printf("c1_pressure_sens %u\n", _prom.c1_pressure_sens);
|
||||
@@ -907,6 +904,10 @@ MS5611::print_info()
|
||||
printf("c5_reference_temp %u\n", _prom.c5_reference_temp);
|
||||
printf("c6_temp_coeff_temp %u\n", _prom.c6_temp_coeff_temp);
|
||||
printf("serial_and_crc %u\n", _prom.serial_and_crc);
|
||||
|
||||
sensor_baro_s brp = {};
|
||||
_reports->get(&brp);
|
||||
print_message(brp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1118,11 +1119,7 @@ test(enum MS5611_BUS busid)
|
||||
err(1, "immediate read failed");
|
||||
}
|
||||
|
||||
warnx("single read");
|
||||
warnx("pressure: %10.4f", (double)report.pressure);
|
||||
warnx("altitude: %11.4f", (double)report.altitude);
|
||||
warnx("temperature: %8.4f", (double)report.temperature);
|
||||
warnx("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
|
||||
/* set the queue depth to 10 */
|
||||
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10)) {
|
||||
@@ -1154,11 +1151,7 @@ test(enum MS5611_BUS busid)
|
||||
err(1, "periodic read failed");
|
||||
}
|
||||
|
||||
warnx("periodic read %u", i);
|
||||
warnx("pressure: %10.4f", (double)report.pressure);
|
||||
warnx("altitude: %11.4f", (double)report.altitude);
|
||||
warnx("temperature: %8.4f", (double)report.temperature);
|
||||
warnx("time: %lld", report.timestamp);
|
||||
print_message(report);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
Reference in New Issue
Block a user