Browse Source

fixed delay 3 second

main
jkpete 3 weeks ago
parent
commit
9a545a7dff
  1. 8
      Script/Model/ModelTrackControl.cs

8
Script/Model/ModelTrackControl.cs

@ -44,11 +44,17 @@ public class ModelTrackControl : EGModule, IEGFramework @@ -44,11 +44,17 @@ public class ModelTrackControl : EGModule, IEGFramework
if (CurrentRotation != 0)
{
this.EGSendMessage(new RequestTargetControl(2000, 500, true), this.GetModule<ModelSerialTest>().EngineSerialPort, ProtocolType.SerialPort);
DelayClear();
}
}
public async void DelayClear()
{
await Task.Delay(3000);
this.EGSendMessage(new RequestTargetResetPosition(), this.GetModule<ModelSerialTest>().EngineSerialPort, ProtocolType.SerialPort);
CurrentRotation = 0;
this.GetModule<ModelActionStatus>().SetRotation(CurrentRotation);
}
}
}

Loading…
Cancel
Save