修正视频诊断任意手门控的冒烟检查

This commit is contained in:
wanglei 2026-11-30 11:50:53 +08:00
parent 6b715002fc
commit 40d36f5e2a

View File

@ -17,8 +17,9 @@ internal static class TriggerDiagnosticsChecks
var control = new ConditionEvaluator(config.Sop.Settings, new() { ["target"] = new(40, 40, 20, 20) });
for (var i = 0; i <= 20; i++)
{
var frame = new FrameResult { FrameId = i, Hands = [new() { HandType = HandType.Left, Rect = new(48, 48, 4, 4) },
new() { HandType = HandType.Right, Rect = i is 2 or 3 or 4 or 8 or 9 ? new(48, 48, 4, 4) : new(80, 80, 4, 4) }] };
// 右手始终可见,左右手轮流命中,确保任意手模式能跨手连续累计稳定帧。
var frame = new FrameResult { FrameId = i, Hands = [new() { HandType = HandType.Left, Rect = i is 0 or 2 or 4 or 8 ? new(48, 48, 4, 4) : new(80, 80, 4, 4) },
new() { HandType = HandType.Right, Rect = i is 3 or 9 ? new(48, 48, 4, 4) : new(80, 80, 4, 4) }] };
diagnostics.ObserveFrame(frame, i / 10d);
if (i >= 6)
{
@ -35,8 +36,8 @@ internal static class TriggerDiagnosticsChecks
}
var result = diagnostics.Build();
var step = result.Steps[1];
Check(step.WindowFrames == 5 && step.WindowRawMatches == 3 && step.WindowMaxConsecutiveMatches == 3 && step.WindowFirstReadySeconds == .3,
"独立窗口观察必须复用实际any优先右手语义,不能把左手常驻当作命中");
Check(step.WindowFrames == 5 && step.WindowRawMatches == 4 && step.WindowMaxConsecutiveMatches == 3 && step.WindowFirstReadySeconds == .3,
"独立窗口按任意手命中计数,并在两手均离开区域时中断稳定帧");
Check(step.ArmedSeconds == .6 && step.CapturedSeconds == .9 && step.SubmittedAtSeconds == 1.4 && step.ConfirmedAtSeconds == 2,
"实际启用、取图、发送、确认时间须区分,不能把延迟发送时间当成取图时间");
Check(step.ActualRawMatches == 2 && step.ActualMaxStableFrames == 2 && result.ObservedFrames == 21,