From 201f903c3de5aa2eed41a2801ff45a39cc66a111 Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Wed, 13 May 2026 11:26:33 +0800 Subject: [PATCH] =?UTF-8?q?ai=E4=BC=98=E5=8C=967?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Wpf_AiSportsMicrospace/Common/SportOperate.cs | 11 ++++++----- Wpf_AiSportsMicrospace/Views/Home.xaml.cs | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Wpf_AiSportsMicrospace/Common/SportOperate.cs b/Wpf_AiSportsMicrospace/Common/SportOperate.cs index 7fed95a..d955581 100644 --- a/Wpf_AiSportsMicrospace/Common/SportOperate.cs +++ b/Wpf_AiSportsMicrospace/Common/SportOperate.cs @@ -167,13 +167,14 @@ namespace Wpf_AiSportsMicrospace.Common if (wrist == null) return false; - if (shoulder != null && wrist.Y <= shoulder.Y + 40) - return true; + if (shoulder == null || elbow == null) + return false; - if (elbow != null && wrist.Y <= elbow.Y - 20) - return true; + bool wristAboveShoulder = wrist.Y <= shoulder.Y - 20; + bool wristAboveElbow = wrist.Y <= elbow.Y - 20; + bool closeToBody = Math.Abs(wrist.X - shoulder.X) <= 260; - return false; + return wristAboveShoulder && wristAboveElbow && closeToBody; } /// diff --git a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs index 2a864d9..c94f2fa 100644 --- a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs @@ -34,7 +34,7 @@ namespace Wpf_AiSportsMicrospace private WavingAction _lastGestureAction = WavingAction.None; private DateTime _lastMenuSlideTime = DateTime.MinValue; private bool _isNavigating; - private const int MenuSlideCooldownMs = 480; + private const int MenuSlideCooldownMs = 420; public Home() {