Skip to content

Bug In I2C Library #173

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

Closed
oclyke opened this issue Jun 10, 2020 · 3 comments · Fixed by #174
Closed

Bug In I2C Library #173

oclyke opened this issue Jun 10, 2020 · 3 comments · Fixed by #174

Comments

@oclyke
Copy link
Contributor

oclyke commented Jun 10, 2020

Seems like all the Wire objects use the macro AP3_Wire1_IOM when they should use

AP3_Wire1_IOM
AP3_Wire2_IOM
AP3_Wire3_IOM
AP3_Wire4_IOM
AP3_Wire5_IOM

See the source code here

@nseidle
Copy link
Member

nseidle commented Jun 10, 2020

Crazy. Yep. Looks like it is currently only affecting a few variants:

  • Artemis module (count = 6)
  • RedBoard Artemis (count = 4)
  • Edge/Edge2 (count = 3)

Everything else with a count of 1 or 2 shouldn't have issue.

RedBoard has the primary set to IOM 4 and Wire1 at IOM 2. So Wire2 and Wire3 were really pointing at Wire1. I don't think many people use 'Wire2' or 'Wire3' and/or they are instantiating their own class.

How did you find this bug?

@oclyke
Copy link
Contributor Author

oclyke commented Jun 10, 2020

Found it while answering this forum question:
https://forum.sparkfun.com/viewtopic.php?f=169&t=51004

Basically logging this issue for when I can get to it. Glad it doesn't have much impact (that's probably why we haven't seen it before) but a bug's a bug.

@oclyke
Copy link
Contributor Author

oclyke commented Jun 10, 2020

Ehhh what am I saying this is so easy to fix...

>>> import timeit
>>> timeit.timeit('owen.fix_bug()', number=10000)

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

Successfully merging a pull request may close this issue.

2 participants