diff --git a/src/MPU9250_asukiaaa.cpp b/src/MPU9250_asukiaaa.cpp index 280b979..2efea7b 100644 --- a/src/MPU9250_asukiaaa.cpp +++ b/src/MPU9250_asukiaaa.cpp @@ -39,6 +39,16 @@ uint8_t MPU9250_asukiaaa::i2cWriteByte(uint8_t Address, uint8_t Register, uint8_ return myWire->endTransmission(); } +MPU9250_asukiaaa::MPU9250_asukiaaa(uint8_t address): + address(address) { + accelRange = 0; + gyroRange = 0; + magXOffset = 0; + magYOffset = 0; + magZOffset = 0; + myWire = NULL; +} + void MPU9250_asukiaaa::setWire(TwoWire* wire) { myWire = wire; } diff --git a/src/MPU9250_asukiaaa.h b/src/MPU9250_asukiaaa.h index 3f60663..cf1bac2 100644 --- a/src/MPU9250_asukiaaa.h +++ b/src/MPU9250_asukiaaa.h @@ -35,15 +35,7 @@ class MPU9250_asukiaaa { uint8_t gyroBuff[MPU9250_BUFF_LEN_GYRO]; uint8_t magBuff[MPU9250_BUFF_LEN_MAG]; - MPU9250_asukiaaa(uint8_t address = MPU9250_ADDRESS_AD0_LOW) { - this->address = address; - accelRange = 0; - gyroRange = 0; - magXOffset = 0; - magYOffset = 0; - magZOffset = 0; - myWire = NULL; - } + MPU9250_asukiaaa(uint8_t address = MPU9250_ADDRESS_AD0_LOW); void setWire(TwoWire *wire); uint8_t readId(uint8_t *id);