From e7a008934080d3a2a6b0a75f478a1ea29f8d20d0 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 29 Jan 2017 16:21:27 +0100 Subject: [PATCH] 9250: Fill device ID for mag correctly --- src/drivers/mpu9250/mpu9250.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/mpu9250/mpu9250.cpp b/src/drivers/mpu9250/mpu9250.cpp index c2b31724c0..3280a50078 100644 --- a/src/drivers/mpu9250/mpu9250.cpp +++ b/src/drivers/mpu9250/mpu9250.cpp @@ -183,9 +183,12 @@ MPU9250::MPU9250(device::Device *interface, device::Device *mag_interface, const /* Prime _mag with parents devid. */ _mag->_device_id.devid = _device_id.devid; _mag->_device_id.devid_s.devtype = DRV_MAG_DEVTYPE_MPU9250; + _mag->_device_id.devid_s.bus_type = _interface->get_device_bus_type(); + _mag->_device_id.devid_s.bus = _interface->get_device_bus(); + _mag->_device_id.devid_s.address = _interface->get_device_address(); /* For an independent mag, ensure that it is connected to the i2c bus */ - + _interface->set_device_type(_device_id.devid_s.devtype); // default accel scale factors _accel_scale.x_offset = 0;