Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakkaj opened this issue Oct 12, 2022 · 1 comment

Comments

@jakkaj
Copy link

jakkaj commented Oct 12, 2022

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)
@polyhobbyist
Copy link
Owner

Hi @jakkaj,
Sorry for the delay on this. I was wondering if you happen to have added this method? If so, I'd love to infoporate it. I don't have that device to specifically test against.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants