Skip to content

convertTo2sComplement() needs to be removed #6

Description

@torriem

I'm a baffled as to why there's a member function called, convertTo2sComplement(). Integers of any size in C are by definition two's complement already. There's nothing to convert.

Furthermore, the result of convertTo2sComplement() for any negative value is always 2, which is clearly incorrect.

The solution is to remove the function entirely. It's not needed and no other MMA8252 library I've looked at has one. They all just write the uint8_t offset values directly to the appropriate I2C registers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions