arshtech commited on
Commit
94bfef5
·
verified ·
1 Parent(s): f838156

Create gesture_matcher.py

Browse files
Files changed (1) hide show
  1. gesture_matcher.py +8 -0
gesture_matcher.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ def match_gesture(finger_states, gesture_rules):
2
+ """
3
+ Matches finger state with stored gestures
4
+ """
5
+ for name, info in gesture_rules.items():
6
+ if finger_states == info["pattern"]:
7
+ return name
8
+ return None