-
Notifications
You must be signed in to change notification settings - Fork 1.2k
get an active device's serial number? #548
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
Comments
I looked into this briefly, and it's not easy. It would be easy if we could always trust the camera serial, but we have to fall back on the audio serial for K4W devices. |
I see. Out of curiosity, why is the fallback a problem? Is it that the audio serial is a different length or could possibly be a "duplicate" to a real Kinect serial number? |
The audio serial itself works fine, but it's tough to get it to handle all edge cases. Like what if the caller asked to open MOTOR only? Unlikely, but it makes it more difficult to figure out which It appears we'd have to do another libusb query for the list of all devices and search through them to find the matching audio device, or try to do everything up-front when opening subdevices (which is rather brittle code already). It's also necessary to call libusb_open_device() before querying the serial, which opens another door for failure. My first attempt was complete spaghetti code. But now that I think about it, it might work to add a I don't have a lot of time to work on this, but I'll give it another go when I get a chance. |
Good news! Check out #554. |
Uh oh!
There was an error while loading. Please reload this page.
I'm using the C++ wrappers, so I have some class like
and could ideally emulate the loop here
libfreenect/src/core.c
Lines 194 to 199 in 83e57e1
since I've stored both the index and the context, and instead of comparing strings, I'm actually just checking what index I'm at. But this is a hidden function
libfreenect/src/core.c
Line 188 in 83e57e1
so now I would need to start re-doing that code. Is there any way to do this differently, or is this the only option?
The text was updated successfully, but these errors were encountered: