ai优化7

This commit is contained in:
tanglong 2026-05-13 11:26:33 +08:00
parent 6c9f7ffab6
commit 201f903c3d
2 changed files with 7 additions and 6 deletions

View File

@ -167,13 +167,14 @@ namespace Wpf_AiSportsMicrospace.Common
if (wrist == null)
return false;
if (shoulder != null && wrist.Y <= shoulder.Y + 40)
return true;
if (elbow != null && wrist.Y <= elbow.Y - 20)
return true;
if (shoulder == null || elbow == null)
return false;
bool wristAboveShoulder = wrist.Y <= shoulder.Y - 20;
bool wristAboveElbow = wrist.Y <= elbow.Y - 20;
bool closeToBody = Math.Abs(wrist.X - shoulder.X) <= 260;
return wristAboveShoulder && wristAboveElbow && closeToBody;
}
/// <summary>

View File

@ -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()
{