Update MultiWheel fleet sync and restore clamp support

This commit is contained in:
2026-06-30 22:20:10 +08:00
parent 3411654a34
commit 574987222a
14 changed files with 287 additions and 225 deletions
+15
View File
@@ -210,6 +210,21 @@ namespace MultiWheelC
DLog.Log("驱动器下使能完成", "TireFollowing");
}
// 夹抱:close 为 true 时关闭夹抱,否则打开夹抱。
public void ClamptoTarget(bool close)
{
if (PilotDefinition.Self.GhostMode)
{
Thread.Sleep(2000);
Console.WriteLine("夹抱完成");
return;
}
new DriveTask(new ClampToTarget()
{
LeftClampTarget = close ? PilotDefinition.Self.LeftArmUpperPos : PilotDefinition.Self.LeftArmLowerPos,
RightClampTarget = close ? PilotDefinition.Self.RightArmUpperPos : PilotDefinition.Self.RightArmLowerPos
}.Get()).Wait();
}
public void LineTracking(int srcId, int dstId, float LineDistance)
{
while (!TryLock(dstId))