diff --git a/Script/Model/ModelTrackControl.cs b/Script/Model/ModelTrackControl.cs index c17e7e8..d293642 100644 --- a/Script/Model/ModelTrackControl.cs +++ b/Script/Model/ModelTrackControl.cs @@ -44,12 +44,18 @@ public class ModelTrackControl : EGModule, IEGFramework if (CurrentRotation != 0) { this.EGSendMessage(new RequestTargetControl(2000, 500, true), this.GetModule().EngineSerialPort, ProtocolType.SerialPort); - this.EGSendMessage(new RequestTargetResetPosition(), this.GetModule().EngineSerialPort, ProtocolType.SerialPort); - CurrentRotation = 0; - this.GetModule().SetRotation(CurrentRotation); + DelayClear(); } } + public async void DelayClear() + { + await Task.Delay(3000); + this.EGSendMessage(new RequestTargetResetPosition(), this.GetModule().EngineSerialPort, ProtocolType.SerialPort); + CurrentRotation = 0; + this.GetModule().SetRotation(CurrentRotation); + } + } public enum StatusTrack