mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 19:33:33 +08:00
MPU6K: Fix device ID
This commit is contained in:
@@ -2030,8 +2030,8 @@ MPU6000::measure()
|
||||
arb.temperature_raw = report.temp;
|
||||
arb.temperature = _last_temperature;
|
||||
|
||||
/* Return class instance as a surrogate device ID */
|
||||
arb.device_id = _accel_class_instance;
|
||||
/* return device ID */
|
||||
arb.device_id = _device_id;
|
||||
|
||||
grb.x_raw = report.gyro_x;
|
||||
grb.y_raw = report.gyro_y;
|
||||
@@ -2066,8 +2066,8 @@ MPU6000::measure()
|
||||
grb.temperature_raw = report.temp;
|
||||
grb.temperature = _last_temperature;
|
||||
|
||||
/* Return class instance as a surrogate device ID */
|
||||
grb.device_id = _gyro->_gyro_class_instance;
|
||||
/* return device ID */
|
||||
grb.device_id = _gyro->_device_id;
|
||||
|
||||
_accel_reports->force(&arb);
|
||||
_gyro_reports->force(&grb);
|
||||
@@ -2345,7 +2345,7 @@ fail:
|
||||
}
|
||||
|
||||
if (bus.dev != nullptr) {
|
||||
delete(bus.dev);
|
||||
delete bus.dev;
|
||||
bus.dev = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user