Skip to content

Request - Add override method to support newer Arduino Wire.cpp implementation #2

@jakkaj

Description

@jakkaj

The following code from Sparkfun attempts to call an override that results in an incorrrect call to the wrong Wire.cpp requestFrom override.

What is happening?
https://github.com/sparkfun/SparkFun_6DoF_ISM330DHCX_Arduino_Library/blob/main/src/sfe_bus.cpp#L183

nReturned = _i2cPort->requestFrom((int)addr, (int)nChunk, (int)true);

is calling:
https://github.com/sparkfun/SparkFun_6DoF_ISM330DHCX_Arduino_Library/blob/main/src/sfe_bus.cpp#L183

uint32_t TwoWire::requestFrom(uint16_t id, uint16_t regi, size_t size)

but it should be calling

https://github.com/polyhobbyist/wiring_for_ros/blob/main/Wire.cpp#L118

uint32_t TwoWire::requestFrom(uint16_t id, size_t size)

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