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

bugfix for open subdevices opening wrong device / not opening all devices #479

Closed
wants to merge 3 commits into from

Conversation

ofTheo
Copy link
Contributor

@ofTheo ofTheo commented Aug 24, 2016

I have been dealing with this issue for a while now.
It mainly comes up when using multiple Kinects, especially if they are of a different type ( i.e: a mixture of 1473, K4W and 1414 models ).

This PR rewrites the motor and audio opening code in fnusb_open_subdevices so that it now only matches audio and motor devices that have the same libusb parent as the camera. The old code was doing a for loop through all devices in the system and trying to match based on the order listed. My guess is that this approach fails to get the correct audio device and therefore doesn't upload the audio firmware to the correct kinect.

In test, this produces much more stable results and makes it so I can open three different devices ( a 1473, K4w and 1414 ) at the same time with no error and every time. ( the current master works sometimes, when the audio firmware has been uploaded, but on first connection to the computer fails and needs several open / close to get devices working ).

In addition the code in the current master produces the following message when trying to open three devices:

Failed to open motor subddevice or it is not disabled. Failed to open audio subdevice

And not all devices load ( see image )

screen shot 2016-08-24 at 3 21 45 pm

The code in this PR doesn't get this error and loads and runs all kinects correctly. ( see image )

screen shot 2016-08-24 at 2 26 47 pm

…. this results in more reliable uploading of audio firmware when there are multiple devices.
@piedar piedar added this to the v0.5.4 milestone Aug 24, 2016
@piedar
Copy link
Contributor

piedar commented Aug 24, 2016

Wow! Can't wait to try it.

@ofTheo
Copy link
Contributor Author

ofTheo commented Aug 24, 2016

@piedar - yeah would be good to test with different setups. I tested it quite heavily on OS X and nothing in the changes should be platform specific, but would be good to try it out on other setups.

@piedar
Copy link
Contributor

piedar commented Aug 25, 2016

Works for me on Linux - nice simplification!

Please sign your commit with git commit --amend -s; if I sign it myself, Github shows "Closed" instead of "Merged".

ofTheo added 2 commits August 25, 2016 21:47
…. this results in more reliable uploading of audio firmware when there are multiple devices.

Signed-off-by: ofTheo <theo@openframeworks.cc>
@ofTheo
Copy link
Contributor Author

ofTheo commented Aug 26, 2016

thanks @piedar good to hear!
apologies about forgetting the sign off :)

Should be good now.

@piedar
Copy link
Contributor

piedar commented Aug 26, 2016

Something went weird and it ended up with 3 commits, so I just cherry-picked b483354. Thanks!

@piedar piedar closed this Aug 26, 2016
@piedar piedar mentioned this pull request Aug 28, 2016
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