From da87e3eb0a77d69408964f4626235b88d87d6b1a Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sat, 14 Jan 2017 08:57:00 +0100 Subject: [PATCH] posix drivers: Populate device ID in sensor topics for simulated IMU --- src/platforms/posix/drivers/gyrosim/gyrosim.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp index 349fe461c6..a92994b8e4 100644 --- a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp +++ b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp @@ -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);