posix drivers: Populate device ID in sensor topics for simulated IMU

This commit is contained in:
Paul Riseborough
2017-01-19 19:24:52 +01:00
committed by Lorenz Meier
parent 961474f430
commit da87e3eb0a
@@ -1107,6 +1107,9 @@ GYROSIM::_measure()
arb.y_integral = aval_integrated(1);
arb.z_integral = aval_integrated(2);
/* TODO return unique hardware ID */
arb.device_id = 0;
grb.x_raw = (int16_t)(mpu_report.gyro_x / _gyro_range_scale);
grb.y_raw = (int16_t)(mpu_report.gyro_y / _gyro_range_scale);
grb.z_raw = (int16_t)(mpu_report.gyro_z / _gyro_range_scale);
@@ -1129,6 +1132,9 @@ GYROSIM::_measure()
grb.y_integral = gval_integrated(1);
grb.z_integral = gval_integrated(2);
/* TODO return unique hardware ID */
grb.device_id = 0;
_accel_reports->force(&arb);
_gyro_reports->force(&grb);