Exemple #1
0
        private double Read(GTI.AnalogInput input)
        {
            double total = 0;

            for (int i = 0; i < this.samples; i++)
            {
                total += input.ReadProportion();
            }

            return(total / this.samples);
        }
Exemple #2
0
 /// <summary>
 ///  Returns the current position of the potentiometer relative to its maximum: range 0.0 to 1.0
 /// </summary>
 public double ReadPotentiometerPercentage()
 {
     return(input.ReadProportion());
 }