diff --git a/src/drivers/mpu6000/mpu6000.cpp b/src/drivers/mpu6000/mpu6000.cpp index 11245b3e01..4e7da0a2ea 100644 --- a/src/drivers/mpu6000/mpu6000.cpp +++ b/src/drivers/mpu6000/mpu6000.cpp @@ -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; }