ai优化7
This commit is contained in:
parent
6c9f7ffab6
commit
201f903c3d
@ -167,13 +167,14 @@ namespace Wpf_AiSportsMicrospace.Common
|
|||||||
if (wrist == null)
|
if (wrist == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (shoulder != null && wrist.Y <= shoulder.Y + 40)
|
if (shoulder == null || elbow == null)
|
||||||
return true;
|
|
||||||
|
|
||||||
if (elbow != null && wrist.Y <= elbow.Y - 20)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
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>
|
/// <summary>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace Wpf_AiSportsMicrospace
|
|||||||
private WavingAction _lastGestureAction = WavingAction.None;
|
private WavingAction _lastGestureAction = WavingAction.None;
|
||||||
private DateTime _lastMenuSlideTime = DateTime.MinValue;
|
private DateTime _lastMenuSlideTime = DateTime.MinValue;
|
||||||
private bool _isNavigating;
|
private bool _isNavigating;
|
||||||
private const int MenuSlideCooldownMs = 480;
|
private const int MenuSlideCooldownMs = 420;
|
||||||
|
|
||||||
public Home()
|
public Home()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user