fix auto domain camera bug

This commit is contained in:
辉鸭蛋
2024-12-02 23:40:54 +08:00
parent 6cfa4b27a6
commit dffccd0740
3 changed files with 15 additions and 16 deletions

View File

@@ -705,6 +705,19 @@ public class AutoDomainTask : ISoloTask
{
// 算作对准了
continuousCount++;
// 360 度 东方向视角
if (continuousCount > 5)
{
if (!started && moveAvatarTask.Status != TaskStatus.Running)
{
started = true;
moveAvatarTask.Start();
}
}
}
else
{
continuousCount = 0;
}
if (angle <= 180)
@@ -717,7 +730,6 @@ public class AutoDomainTask : ISoloTask
}
Simulation.SendInput.Mouse.MoveMouseBy(-moveAngle, 0);
continuousCount = 0;
}
else if (angle is > 180 and < 360)
{
@@ -729,19 +741,6 @@ public class AutoDomainTask : ISoloTask
}
Simulation.SendInput.Mouse.MoveMouseBy(moveAngle, 0);
continuousCount = 0;
}
else
{
// 360 度 东方向视角
if (continuousCount > 5)
{
if (!started && moveAvatarTask.Status != TaskStatus.Running)
{
started = true;
moveAvatarTask.Start();
}
}
}
Sleep(100);

View File

@@ -215,7 +215,7 @@ public class CameraOrientationFromLimint
}
float rotationConfidence = (conv[maxIndex] + mean.Skip(thetaLength - peakWidth).Sum()) / (peakWidth * 255);
Debug.WriteLine($"置信度:{rotationConfidence}");
Debug.WriteLine($"视角度:{degree},置信度:{rotationConfidence}");
// if (rotationConfidence < confidence)
// {
// Debug.WriteLine($"置信度{rotationConfidence}<{confidence}, 不可靠视角 {degree}");

View File

@@ -577,7 +577,7 @@ public partial class HotKeyPageViewModel : ObservableObject, IViewModel
(_, _) =>
{
GoToCraftingBenchTask goToCraftingBenchTask = new GoToCraftingBenchTask();
Task.Run(async () => { await goToCraftingBenchTask.Start("枫丹", new CancellationToken()); });
Task.Run(async () => { await goToCraftingBenchTask.Start("璃月", new CancellationToken()); });
}
));