Hi everyone,
I'm new to Leap Motion development and I'm having an issue when I try PollingSample.c.
By looking at the Control Panel, The Leap Motion seems to work pretty fine ( every status is GOOD/GREEN ).
But when I debug the application, it blocks at the while(!IsConnected) and never passed this condition to continue the program.
I'm using Leap Motion SDK 4.0.0+52173.
int main(int argc, char** argv) {
OpenConnection();
while(!IsConnected)
millisleep(100); //wait a bit to let the connection complete
printf("Connected.");
LEAP_DEVICE_INFO* deviceProps = GetDeviceProperties();
if(deviceProps)
printf("Using device %s.\n", deviceProps->serial);
for(;;)
{
LEAP_TRACKING_EVENT *frame = GetFrame();
if(frame && (frame->tracking_frame_id > lastFrameID))
{
lastFrameID = frame->tracking_frame_id;
printf("Frame %lli with %i hands.\n", (long long int)frame->tracking_frame_id, frame->nHands);
for(uint32_t h = 0; h < frame->nHands; h++)
{
LEAP_HAND* hand = &frame->pHands[h];
printf(" Hand id %i is a %s hand with position (%f, %f, %f).\n",
hand->id,
(hand->type == eLeapHandType_Left ? "left" : "right"),
hand->palm.position.x,
hand->palm.position.y,
hand->palm.position.z);
}
}
} //ctrl-c to exit
return 0;
}
Am I missing something?
If someone can help me I'll be very grateful.
Thanks in advance!