From 7c9e9f31e1f9804f4a96a836261d140e317e4359 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sat, 14 Jan 2017 08:50:54 +0100 Subject: [PATCH] drivers/mpu9250: Populate device ID in sensor topics --- src/drivers/mpu9250/mpu9250.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drivers/mpu9250/mpu9250.cpp b/src/drivers/mpu9250/mpu9250.cpp index 8a33fbb3ce..8bbe1fb6b6 100644 --- a/src/drivers/mpu9250/mpu9250.cpp +++ b/src/drivers/mpu9250/mpu9250.cpp @@ -1424,6 +1424,9 @@ MPU9250::measure() arb.temperature_raw = report.temp; arb.temperature = _last_temperature; + /* TODO return unique hardware ID */ + arb.device_id = 0; + grb.x_raw = report.gyro_x; grb.y_raw = report.gyro_y; grb.z_raw = report.gyro_z; @@ -1457,6 +1460,9 @@ MPU9250::measure() grb.temperature_raw = report.temp; grb.temperature = _last_temperature; + /* TODO return unique hardware ID */ + grb.device_id = 0; + _accel_reports->force(&arb); _gyro_reports->force(&grb);