Beispiel #1
0
 public void SetProbeDivision(AnalogChannel ch, ProbeDivision division)
 {
     probeSettings[ch] = division;
     SetVerticalRange(ch, verticalRanges[ch].minimum, verticalRanges[ch].maximum);
 }
 public void SetProbeDivision(AnalogChannel ch, ProbeDivision division)
 {
     ChannelConfig[ch].probeDivision = division;
 }
 public void SetProbeDivision(AnalogChannel ch, ProbeDivision division)
 {
     probeSettings[ch] = division;
     SetVerticalRange(ch, verticalRanges[ch].minimum, verticalRanges[ch].maximum);
 }
Beispiel #4
0
 public void SetProbeDivision(AnalogChannel ch, ProbeDivision division)
 {
 }
Beispiel #5
0
        public static float[] ConvertByteToVoltage(this byte[] buffer, SmartScope.GainCalibration calibration, byte yOffset, ProbeDivision division)
        {
            double[] coefficients = calibration.coefficients;
            float[]  voltage      = new float[buffer.Length];

            //this section converts twos complement to a physical voltage value
            float totalOffset = (float)(yOffset * coefficients[1] + coefficients[2]);
            float gain        = division;

            voltage = buffer.Select(x => (float)(x * coefficients[0] + totalOffset) * gain).ToArray();
            return(voltage);
        }
Beispiel #6
0
        public static ProbeDivision findByFactor(float factor)
        {
            ProbeDivision d = divs.SingleOrDefault(x => x.factor == factor);

            return(d == null ? X1 : d);
        }
Beispiel #7
0
 public static float ConvertByteToVoltage(this byte b, SmartScope.GainCalibration calibration, byte yOffset, ProbeDivision division)
 {
     return((new byte[] { b }).ConvertByteToVoltage(calibration, yOffset, division)[0]);
 }