From cc7930caf34a4a85443567ea9e97a4da89a94f73 Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Mon, 30 Nov 2015 14:51:43 -0800 Subject: [PATCH] mpu9250: propagated new constructor flag for i2c bypass Signed-off-by: Mihai Tudor Panu --- src/mpu9150/mpu9250.cxx | 4 ++-- 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 6eccf8c8..c646a983 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 2b2b95c7..b7d0f061 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