sensors:Use inttypes

This commit is contained in:
David Sidrane
2021-06-16 17:07:47 +02:00
committed by Julian Oes
parent 274c55a4ae
commit d73f842151
6 changed files with 30 additions and 24 deletions
@@ -207,7 +207,7 @@ void VehicleAirData::Run()
}
if (_selected_sensor_sub_index >= 0) {
PX4_INFO("%s switch from #%u -> #%d", "BARO", _selected_sensor_sub_index, best_index);
PX4_INFO("%s switch from #%" PRIu8 " -> #%d", "BARO", _selected_sensor_sub_index, best_index);
}
_selected_sensor_sub_index = best_index;
@@ -316,10 +316,11 @@ void VehicleAirData::Run()
void VehicleAirData::PrintStatus()
{
if (_selected_sensor_sub_index >= 0) {
PX4_INFO("selected barometer: %d (%d)", _last_data[_selected_sensor_sub_index].device_id, _selected_sensor_sub_index);
PX4_INFO("selected barometer: %" PRIu32 " (%" PRId8 ")", _last_data[_selected_sensor_sub_index].device_id,
_selected_sensor_sub_index);
if (fabsf(_thermal_offset[_selected_sensor_sub_index]) > 0.f) {
PX4_INFO("%d temperature offset: %.4f", _last_data[_selected_sensor_sub_index].device_id,
PX4_INFO("%" PRIu32 " temperature offset: %.4f", _last_data[_selected_sensor_sub_index].device_id,
(double)_thermal_offset[_selected_sensor_sub_index]);
}
}