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:
Julian Oes
2016-04-08 15:51:16 +02:00
parent 8422280f18
commit 36d580bdc8
3 changed files with 4 additions and 4 deletions
@@ -408,7 +408,7 @@ int DfMpu9250Wrapper::_publish(struct imu_sensor_data &data)
perf_begin(_accel_sample_perf);
accel_report accel_report = {};
accel_report.timestamp = data.last_read_time_usec;
accel_report.timestamp = hrt_absolute_time();
// TODO: remove these (or get the values)
accel_report.x_raw = NAN;
@@ -456,7 +456,7 @@ int DfMpu9250Wrapper::_publish(struct imu_sensor_data &data)
perf_begin(_gyro_sample_perf);
gyro_report gyro_report = {};
gyro_report.timestamp = data.last_read_time_usec;
gyro_report.timestamp = hrt_absolute_time();
// TODO: remove these (or get the values)
gyro_report.x_raw = NAN;