You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
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.
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)
Activity
Cervator commentedon Aug 17, 2016
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 commentedon 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 commentedon Aug 19, 2016
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.