Jump to content
I2Cdevlib Forums

jgauthier

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by jgauthier

  1. Greetings, There is a piece of code called setMemoryBank, in the MPU6050 class (MPU6050.cpp). It looks like this: void MPU6050::setMemoryBank(uint8_t bank, bool prefetchEnabled, bool userBank) { bank &= 0x1F; if (userBank) bank |= 0x20; if (prefetchEnabled) bank |= 0x40; I2Cdev::writeByte(devAddr, MPU6050_RA_BANK_SEL, bank); } This is used in dmpInitialize() (MPU6050_6Axis_MotionApps20.h). Likewise, further down in dmpInitialize() writeProgMemoryBlock() is called to write the DMP code to the IMU. However, inside writeProgMemoryBlock() there is another call to setMemoryBank, but only takes one argument. The function isn't overloaded anywhere. I'm assuming it's the same function without the two booleans set to True. But I'd like to know for sure. I can't find this code anywhere else. Likewise, writeMemoryBlock() is called with 4 parameters instead of 6. I feel like this code shouldn't be here, or it's for a different API. writeProgMemoryBlock() is all wrong as well.
×
×
  • Create New...