From 9a2667808714c63037c4df1b71f00fdac6127f73 Mon Sep 17 00:00:00 2001 From: David <daidavid0609@gmail.com> Date: Sat, 4 Jun 2022 22:02:04 +0200 Subject: [PATCH] changed list to use generator expression --- modules/GestureLibs/GestureDetector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/GestureLibs/GestureDetector.py b/modules/GestureLibs/GestureDetector.py index 13fd7bc..f97e732 100644 --- a/modules/GestureLibs/GestureDetector.py +++ b/modules/GestureLibs/GestureDetector.py @@ -173,12 +173,12 @@ class GestureDetector: def match_gesture(self): # Match previous information to a gesture - DirectionsList = [] + DirectionsList = [fingertip.direction for fingertip in self.FingerTipsData] GestureDirection = "" - for fingertip in self.FingerTipsData: - DirectionsList.append(fingertip.direction) - print("Directions", DirectionsList) +# for fingertip in self.FingerTipsData: +# DirectionsList.append(fingertip.direction) +# print("Directions", DirectionsList) # To find the majority of the directions of fingers, the fingers direction have to be mapped to an integer value DirectionsList = convert_dir_id(DirectionsList) -- GitLab