Skip to content

Examples, ODR bit code does nothing #17

@lienbacher

Description

@lienbacher

I noticed in the examples code that the 2 lines that set the ODR bit in CTRL4_C register do nothing:

//Set the ODR bit errorAccumulator += myIMU.readRegister(&dataToWrite, LSM6DS3_ACC_GYRO_CTRL4_C); dataToWrite &= ~((uint8_t)LSM6DS3_ACC_GYRO_BW_SCAL_ODR_ENABLED);

dataToWrite is overwritten with an empty register. In the next line - if I am not mistaken, because I may be - the ODR bit is actually unset from the variable holding the register contents. Then nothing is done with dataToWrite code. Certainly there is not a single bit changed in any register in this code, although reading the Datasheet and lining it up with what the rest of the code does it certainly seems that the intention of the code is to set Bit 8 of CTRL4_C register to 1 / register 0x13 to 0x80.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions