diff options
author | Mihai Tudor Panu <mihai.tudor.panu@intel.com> | 2015-11-30 14:51:43 -0800 |
---|---|---|
committer | Mihai Tudor Panu <mihai.tudor.panu@intel.com> | 2015-11-30 14:56:07 -0800 |
commit | cc7930caf34a4a85443567ea9e97a4da89a94f73 (patch) | |
tree | 22b2e6ffbd14b90783e7418e213fe6b1969e0e74 | |
parent | ac21c9336bfac7017f2e511edfbfa997b5781baa (diff) |
mpu9250: propagated new constructor flag for i2c bypass
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
-rw-r--r-- | src/mpu9150/mpu9250.cxx | 4 | ||||
-rw-r--r-- | src/mpu9150/mpu9250.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mpu9150/mpu9250.cxx b/src/mpu9150/mpu9250.cxx index 6eccf8c..c646a98 100644 --- a/src/mpu9150/mpu9250.cxx +++ b/src/mpu9150/mpu9250.cxx @@ -31,8 +31,8 @@ using namespace upm; using namespace std; -MPU9250::MPU9250 (int bus, int address, int magAddress) : - MPU9150(bus, address, magAddress) +MPU9250::MPU9250 (int bus, int address, int magAddress, bool enableAk8975) : + MPU9150(bus, address, magAddress, enableAk8975) { } diff --git a/src/mpu9150/mpu9250.h b/src/mpu9150/mpu9250.h index 2b2b95c..b7d0f06 100644 --- a/src/mpu9150/mpu9250.h +++ b/src/mpu9150/mpu9250.h @@ -58,9 +58,11 @@ namespace upm { * @param bus I2C bus to use * @param address The address for this device * @param magAddress The address of the connected magnetometer + * @param enableAk8975 Enables i2c bypass mode for magnetometer, default + * is true */ MPU9250 (int bus=MPU9250_I2C_BUS, int address=MPU9250_DEFAULT_I2C_ADDR, - int magAddress=AK8975_DEFAULT_I2C_ADDR); + int magAddress=AK8975_DEFAULT_I2C_ADDR, bool enableAk8975=true); /** * MPU9250 destructor |