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

Fix for: HCI Command Failed: 0B #319

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix for: HCI Command Failed: 0B #319

wants to merge 2 commits into from

Conversation

darkain
Copy link

@darkain darkain commented Sep 30, 2017

This corrects the issue with the repeated 0x0B error messages when pairing a Wii Remote from #169

@Lauszus
Copy link
Collaborator

Lauszus commented Oct 11, 2017

Thanks for the pull request. Could you implement this without using a delay? You can do this by extending the state machine.

The reason is that the library might be running on system where it is not allowed to block.

@darkain
Copy link
Author

darkain commented Oct 12, 2017

The exiting stateCounter implementation is also broken though. It directly relies upon 1) the CPU clock speed, and 2) that the particular USB/BT/Wii Remote task is ran at a given interval. Time based code should be entirely re-written around something like elapsedMillis instead.

https://www.pjrc.com/teensy/td_timing_elaspedMillis.html
http://playground.arduino.cc/Code/ElapsedMillis
https://github.com/pfeerick/elapsedMillis/

@Lauszus
Copy link
Collaborator

Lauszus commented Oct 12, 2017

@darkain yes I agree. This is all taken care of in UHS30, as it is interrupt driven, so I think we should just leave the current state machine implementation as is.

Lauszus added a commit that referenced this pull request Nov 10, 2017
This was an issue when connecting to the Wiimote

Fixes #169 and #319
@Lauszus
Copy link
Collaborator

Lauszus commented Nov 10, 2017

@darkain I have opened up a new PR. Please test #327 and report back if it works or not.

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 this pull request may close these issues.

2 participants