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

Always 5 fingers for my gesture hand #35

Open
JordanPeltier opened this issue Aug 16, 2016 · 3 comments
Open

Always 5 fingers for my gesture hand #35

JordanPeltier opened this issue Aug 16, 2016 · 3 comments

Comments

@JordanPeltier
Copy link

Hi everyone,
I do not know how to click or scroll in palm mode. After adding a few print in the code source, I found my problem : when the leaps detects the second hand (left one), it always recognize 5 fingers instead of 2 or 1.
Any ideas about how to fix this problem ?

@Cervator
Copy link
Member

Hi @justidan :-)

Being that the code here is more than two years old I suspect the Leap software has jumped ahead enough to where the original version here may not work too well.

Looking at the network graph I see one fork has moved ahead and has newer code. Maybe check it out and see if that version works differently? https://github.com/comfreeze/PyLeapMouse

@JordanPeltier
Copy link
Author

JordanPeltier commented Aug 17, 2016

Hi,
Actually I found the solution. You have to use the method "extended" in order to remove the non-extended fingers of the list. I probably don't have the same SDK but the latest one.
def do_gesture_recognition(self, gesture_hand, mouse_hand): gesture_fingers = gesture_hand.fingers.extended() if len(gesture_fingers) == 2: #Two open fingers on gesture hand (scroll mode) self.gesture_debouncer.signal(2) #Tell the debouncer we've seen this gesture elif len(gesture_fingers) == 1: #One open finger on gesture hand (click down)

@Cervator
Copy link
Member

Up for submitting a fix for this issue in a PR then? Or was the fix needed elsewhere? :-)

In any case thanks for the sleuthing! Good to have it documented here if nothing else.

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

No branches or pull requests

2 participants