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 override async Task RunningVolumeTest() { await Task.Run(async() => { do { //TODO: Raise events so the UI can respond VolumeTest.PulseACount += FirstPortAInputBoard.ReadInput(); VolumeTest.PulseBCount += FirstPortBInputBoard.ReadInput(); } while (VolumeTest.UncPulseCount < VolumeTest.DriveType.MaxUnCorrected() && !RequestStopTest); _outputBoard?.StopMotor(); await FinishVolumeTest(); }); }