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 -4
View File
@@ -1288,8 +1288,8 @@ BMI160::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;
@@ -1324,8 +1324,8 @@ BMI160::measure()
grb.temperature_raw = report.temp;
grb.temperature = _last_temperature;
/* TODO return unique hardware ID */
grb.device_id = 0;
/* Use class instance as a surrogate hardware ID */
grb.device_id = _gyro->_gyro_class_instance;
_accel_reports->force(&arb);
_gyro_reports->force(&grb);