修改悬停任务普通闪灯等待也不能下一步bug
This commit is contained in:
parent
a5271518e5
commit
625bd3ade9
@ -353,8 +353,26 @@ namespace Plane.FormationCreator.Formation
|
|||||||
// LED灯全亮
|
// LED灯全亮
|
||||||
await Task.WhenAll(SingleCopterInfos.Select(info => LEDFlashTaskFlySingleCopterAsync(info, true)));
|
await Task.WhenAll(SingleCopterInfos.Select(info => LEDFlashTaskFlySingleCopterAsync(info, true)));
|
||||||
//延时等待
|
//延时等待
|
||||||
await Task.Delay((int)(LoiterTimeAttr * 1000)).ConfigureAwait(false);
|
|
||||||
|
//判断是否下一步
|
||||||
|
DateTime start = DateTime.Now;
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (_flightTaskManager.IsPaused == true)
|
||||||
|
{
|
||||||
|
await Task.WhenAll(SingleCopterInfos.Select(info => (info.Copter.HoverAsync())));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime end = DateTime.Now;
|
||||||
|
TimeSpan ts = end - start;
|
||||||
|
//等待指定时间
|
||||||
|
if (ts.TotalMilliseconds > LoiterTimeAttr * 1000)
|
||||||
|
return;
|
||||||
|
await Task.Delay(20).ConfigureAwait(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (oneByOneAttr) // LED走马灯显示效果
|
else if (oneByOneAttr) // LED走马灯显示效果
|
||||||
|
Loading…
Reference in New Issue
Block a user