This commit is contained in:
Boki 2026-02-15 10:43:46 -05:00
parent 6ea373f2c3
commit 3e49a96caa

View file

@ -282,11 +282,24 @@ public class NavigationExecutor : IDisposable
var sw = Stopwatch.StartNew();
var captureStart = sw.Elapsed.TotalMilliseconds;
await _pipeline.ProcessOneFrame();
try
{
await _pipeline.ProcessOneFrame();
}
catch (Exception ex)
{
Log.Warning(ex, "Pipeline capture failed");
}
var frame = _capture.LastFrame;
var captureMs = sw.Elapsed.TotalMilliseconds - captureStart;
if (frame == null) return null;
if (frame == null)
{
// Pipeline didn't produce a frame — fall back to direct capture for debug stages
if (stage != MinimapDebugStage.WorldMap)
return _capture.CaptureStage(stage);
return null;
}
var stitchStart = sw.Elapsed.TotalMilliseconds;
var pos = _worldMap.MatchAndStitch(frame.ClassifiedMat, frame.WallMask, _capture.DetectedMode);