Exemplo n.º 1
0
        /// <inheritdoc/>
        public override void Calibrate()
        {
            if (m_spi == null)
            {
                return;
            }

            Timer.Delay(1.0);

            m_spi.SetAccumulatorCenter(0);
            m_spi.ResetAccumulator();

            Timer.Delay(CalibrationSampleTime);

            m_spi.SetAccumulatorCenter((int)m_spi.GetAccumulatorAverage());
            m_spi.ResetAccumulator();
        }