-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I'm using the C++ wrappers, so I have some class like
class Kinect360_Impl : public Freenect::FreenectDevice {
public:
Kinect360_Impl(freenect_context *_ctx, int _index)
: Freenect::FreenectDevice(_ctx, _index)
, mCtx(_ctx)
, mIndex(_index) {
setDepthFormat(FREENECT_DEPTH_MM, FREENECT_RESOLUTION_MEDIUM);
}
and could ideally emulate the loop here
Lines 194 to 199 in 83e57e1
for(item = attrlist ; item != NULL; item = item->next , index++) { | |
if (strlen(item->camera_serial) == strlen(camera_serial) && strcmp(item->camera_serial, camera_serial) == 0) { | |
freenect_free_device_attributes(attrlist); | |
return freenect_open_device(ctx, dev, index); | |
} | |
} |
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
Line 188 in 83e57e1
int count = fnusb_list_device_attributes(ctx, &attrlist); |
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?
Metadata
Metadata
Assignees
Labels
No labels