drivers: use driver class instance as surrogate sensor ID for gyro and accelerometer

This commit is contained in:
Paul Riseborough
2017-01-19 19:24:52 +01:00
committed by Lorenz Meier
parent 60c12aaa36
commit e84a189380
6 changed files with 20 additions and 19 deletions
+4 -3
View File
@@ -1833,8 +1833,8 @@ MPU6500::measure()
arb.temperature_raw = report.temp;
arb.temperature = _last_temperature;
/* TODO return unique hardware ID */
arb.device_id = 0;
/* Return class instance as a surrogate device ID */
arb.device_id = _accel_class_instance;
grb.x_raw = report.gyro_x;
grb.y_raw = report.gyro_y;
@@ -1869,7 +1869,8 @@ MPU6500::measure()
grb.temperature_raw = report.temp;
grb.temperature = _last_temperature;
/* TODO return unique hardware ID */
/* Use class instance as a surrogate hardware ID */
grb.device_id = _gyro->_gyro_class_instance;
grb.device_id = 0;
_accel_reports->force(&arb);