Ejemplo n.º 1
0
        private void MetricsCalculatedEventHandler(object sender, MovingAverage.MetricsCalculatedEventArgs e)
        {
            if (!m_started)
            {
                return;
            }

            if (e.AverageKph != m_curAvgKph || e.AverageMph != m_curAvgMph || e.OverallPower != m_curOverallPower)
            {
                m_curAvgKph       = e.AverageKph;
                m_curAvgMph       = e.AverageMph;
                m_curOverallPower = e.OverallPower;

                OnMetricsChangedEvent(new MetricsChangedEventArgs(e.AverageKph, e.AverageMph, e.OverallPower));
            }
        }
Ejemplo n.º 2
0
        private void MetricsCalculatedEventHandler(object sender, MovingAverage.MetricsCalculatedEventArgs e)
        {
            if (!m_started)
            {
                return;
            }

            // just saving these most recent values for ride recap
            m_curDuration   = e.Duration;
            m_curDistanceKm = e.DistanceKm;
            m_curDistanceMi = e.DistanceMi;

            if (e.AverageKph != m_curAvgKph || e.AverageMph != m_curAvgMph || e.OverallPower != m_curOverallPower)
            {
                m_curAvgKph       = e.AverageKph;
                m_curAvgMph       = e.AverageMph;
                m_curOverallPower = e.OverallPower;

                OnMetricsChangedEvent(new MetricsChangedEventArgs(e.AverageKph, e.AverageMph, e.OverallPower));
            }
        }