mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 01:21:35 +08:00
DF wrappers: use abs time instead of DF timestamp
The timestamp in the DriverFramework is not the same as the one provided by hrt_absolute_time() in PX4. Because we are publishing on the PX4 side, let's also use the timestamp from there.
This commit is contained in:
@@ -161,7 +161,7 @@ int DfBmp280Wrapper::_publish(struct baro_sensor_data &data)
|
||||
perf_begin(_baro_sample_perf);
|
||||
|
||||
baro_report baro_report = {};
|
||||
baro_report.timestamp = data.last_read_time_usec;
|
||||
baro_report.timestamp = hrt_absolute_time();
|
||||
|
||||
baro_report.pressure = data.pressure_pa;
|
||||
baro_report.temperature = data.temperature_c;
|
||||
|
||||
Reference in New Issue
Block a user