mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 17:23:33 +08:00
drivers: use driver class instance as surrogate sensor ID for gyro and accelerometer
This commit is contained in:
committed by
Lorenz Meier
parent
60c12aaa36
commit
e84a189380
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user