You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/RingController/RingAccessibilityService.cs
+42-7Lines changed: 42 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,12 @@ public class RingAccessibilityService : AccessibilityService, ISensorEventListen
44
44
/// <summary> ThresholdCrossing: last time we executed after a successful <see cref="RingGestureInterpreter.Interpret"/> (rate limit via <see cref="RingModeProfile.AccumulationTimeoutMs"/>). </summary>
45
45
longlastThresholdTriggerAtMs;
46
46
47
+
/// <summary> Last sample where ring reported motion or off-center integral (see <see cref="TryResetInterpreterAfterRingIdle"/>). </summary>
/// <summary> Clears driver/gesture/bookkeeping state after user idle or app switch (high-rate sensor never "gaps" in time). </summary>
53
+
publicvoidResetProcessingStateAfterIdle()
54
+
{
55
+
lastGestureSumForDriver=null;
56
+
lastGestureSensorMs=0;
57
+
lastActionAtMs=0;
58
+
buffer.Clear();
59
+
gestureSequenceStates.Clear();
60
+
}
61
+
62
62
/// <summary>
63
63
/// Gesture mode: accumulates per-frame <c>delta_x</c> and sum deltas per direction (<see cref="DirectionalGestureIncrement"/> dampens release overshoot).
0 commit comments