From 51d78e85cf1215955048b2ecd47483273ac77298 Mon Sep 17 00:00:00 2001 From: pascald Date: Sat, 3 May 2025 01:36:43 +0200 Subject: [PATCH] final changes for better touch function --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index dbc1619..76c401e 100644 --- a/main.py +++ b/main.py @@ -93,11 +93,11 @@ async def touch(event): touch_start = None touch_start_time = None - if abs(dx) < 30 and abs(dy) < 30 and duration < 0.3: + if abs(dx) < 30 and abs(dy) < 30 and duration < 0.1: return "snap" - elif dx < -50 and abs(dy) < 80 and duration > 0.3: + elif dx < -50 and abs(dy) < 80 and duration > 0.08: return "tilt" - elif dy < -50 and abs(dx) < 80 and duration > 0.3: + elif dy < -50 and abs(dx) < 80 and duration > 0.08: return "ontop" else: print("touch problem")