internal void AddDitherIndicator() { lock (lockObj) { var dither = HistoryStep.GenerateDitherStep(); overallGuideSteps.AddLast(dither); GuideSteps.Add(dither); } }
public void Clear() { lock (lockObj) { overallGuideSteps.Clear(); GuideSteps.Clear(); RMS.Clear(); MaxDurationY = 1; HistoryStep.ResetIdProvider(); } }
/// <summary> /// This method will be called by the Guide client and this will show the first Step popup in the list /// </summary> internal void Play() { if (GuideSteps.Any()) { Step firstStep = GuideSteps.FirstOrDefault(); CurrentStep = firstStep; firstStep.Show(GuideFlow.FORWARD); } }
public void AddGuideStep(IGuideStep step) { lock (lockObj) { var historyStep = HistoryStep.FromGuideStep(step, Scale == GuiderScaleEnum.PIXELS ? 1 : PixelScale); overallGuideSteps.AddLast(historyStep); if (GuideSteps.Count == HistorySize) { var elementIdx = overallGuideSteps.Count - HistorySize; if (elementIdx >= 0) { var stepToRemove = overallGuideSteps.ElementAt(elementIdx); RMS.RemoveDataPoint(stepToRemove.RADistanceRaw, stepToRemove.DECDistanceRaw); } } RMS.AddDataPoint(step.RADistanceRaw, step.DECDistanceRaw); GuideSteps.Add(historyStep); CalculateMaximumDurationY(); } }
private void CalculateMaximumDurationY() { MaxDurationY = Math.Abs(GuideSteps.Max((x) => Math.Max(Math.Abs(x.RADuration), Math.Abs(x.DECDuration)))); }