Zach Kinstner

Results 79 comments of Zach Kinstner

Plugins define a fixed number of output channels (see [my comment above](https://github.com/OSVR/OSVR-Leap-Motion/issues/3#issuecomment-126305171)), so we would need to plan ahead for which scenarios we want to handle. For each hand, we...

First pass at the hand-selection logic is available in the [`HandSelector`](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/HandSelector.cpp) class in the commit above. Includes a `//TODO` note: > Improve this selection process, probably by looking at the...

I'm not entirely sure how to test the hand selections: - Using some debugging output (currently commented-out in the code), I can see when certain hand-selection events occur, but the...

The new [`LeapData`](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/LeapData.cpp) class wraps the Leap `Controller` and two (left and right) `HandSelector` instances. It is created within [`ControllerDevice`](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/ControllerDevice.cpp), and provides a consistent way for the various plugin modules...

The [`com_osvr_LeapMotion.cpp`](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/com_osvr_LeapMotion.cpp#L6) code... ``` context.registerHardwareDetectCallback(new LeapOsvr::ControllerDevice()); ``` ...matches the [`com_osvr_example_DummyDetectAndCreateAsync.cpp`](https://github.com/OSVR/OSVR-Core/blob/master/examples/plugin/com_osvr_example_DummyDetectAndCreateAsync.cpp#L96) example code: ``` context.registerHardwareDetectCallback(new HardwareDetection()); ``` Is there a different example available that shows the correct way to do this?

I'm seeing that some examples (like [`com_osvr_example_AnalogSync.cpp`](https://github.com/OSVR/OSVR-Core/blob/master/examples/plugin/com_osvr_example_AnalogSync.cpp) don't use `registerHardwareDetectCallback()` at all. Does the Leap Motion plugin need this step? The Leap `Controller` class can exist even if the device...

Please see the commit referenced above. I have added a [`HardwareDetection`](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/HardwareDetection.cpp) layer, whose only job is to create/send a new `ControllerDevice` to OSVR via `registerObjectForDeletion()`. The [`ControllerDevice`](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/ControllerDevice.cpp) now does all...

@rpavlik wrote: > you could load the library here and see if a device is actually connected I have added this condition to `HardwareDetection` in my local build: ``` cpp...

So far, the above approach seems to work. I'm not sure whether setting `mFound = false` is correct, since that assumes that the previously-created `ControllerDevice` object has been destroyed and...