Exemple #1
0
        private void RebuildGuideHistoryList()
        {
            lock (lockObj) {
                if (overallGuideSteps.Count > 0)
                {
                    var collection = new LinkedList <HistoryStep>();
                    var startIndex = overallGuideSteps.Count - historySize;
                    if (startIndex < 0)
                    {
                        startIndex = 0;
                    }
                    RMS.Clear();
                    for (int i = startIndex; i < overallGuideSteps.Count; i++)
                    {
                        var p = overallGuideSteps.ElementAt(i);
                        RMS.AddDataPoint(p.RADistanceRaw, p.DECDistanceRaw);
                        if (Scale == GuiderScaleEnum.ARCSECONDS)
                        {
                            p = p.AdjustPixelScale(PixelScale);
                        }
                        else
                        {
                            p = p.AdjustPixelScale(1);
                        }
                        collection.AddLast(p);
                    }

                    GuideSteps = new AsyncObservableLimitedSizedStack <HistoryStep>(historySize, collection);
                    CalculateMaximumDurationY();
                }
            }
        }
Exemple #2
0
 public void Clear()
 {
     lock (lockObj) {
         overallGuideSteps.Clear();
         GuideSteps.Clear();
         RMS.Clear();
         MaxDurationY = 1;
         HistoryStep.ResetIdProvider();
     }
 }