Skip to content

Always 5 fingers for my gesture hand #35

Open

Description

@JordanPeltier

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 ?

Activity

  1. Cervator commented on Aug 17, 2016

    @Cervator
    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

  2. JordanPeltier commented on Aug 17, 2016

    @JordanPeltier
    Author

    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)

  3. Cervator commented on Aug 19, 2016

    @Cervator
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions