mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 05:40:36 +08:00
sensor_baro add separate timestamp_sample field
- the timestamp is uORB message publication metadata
This commit is contained in:
@@ -200,7 +200,7 @@ void VehicleAirData::Run()
|
||||
|
||||
const sensor_baro_s &baro = _last_data[_selected_sensor_sub_index];
|
||||
|
||||
_baro_timestamp_sum += baro.timestamp;
|
||||
_baro_timestamp_sum += baro.timestamp_sample;
|
||||
_baro_sum += baro.pressure;
|
||||
_baro_sum_count++;
|
||||
|
||||
@@ -217,7 +217,7 @@ void VehicleAirData::Run()
|
||||
|
||||
// populate vehicle_air_data with primary baro and publish
|
||||
vehicle_air_data_s out{};
|
||||
out.timestamp_sample = timestamp_sample; // TODO: baro.timestamp_sample;
|
||||
out.timestamp_sample = timestamp_sample;
|
||||
out.baro_device_id = baro.device_id;
|
||||
out.baro_temp_celcius = baro.temperature;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user