private async Task RunSyncTest() { await Task.Run(async() => { if (!RunningTest) { Log.Info("Syncing Volume..."); await InstrumentCommunicator.Disconnect(); VolumeTest.PulseACount = 0; VolumeTest.PulseBCount = 0; _outputBoard.StartMotor(); do { VolumeTest.PulseACount += FirstPortAInputBoard.ReadInput(); VolumeTest.PulseBCount += FirstPortBInputBoard.ReadInput(); } while (VolumeTest.UncPulseCount < 1); _outputBoard.StopMotor(); Thread.Sleep(500); } }); }
public async Task ResetTach() { await Task.Run(() => { _outputBoard.StartMotor(); Thread.Sleep(500); _outputBoard.StopMotor(); Thread.Sleep(100); }); }