Exemplo n.º 1
0
 // Calculates the unit conversion factors for voltage (volts <-> millivolts)
 public double GetVoltageUnitConversionFactor(ControlEnums.VOLTAGEUNITS unit)
 {
     if (unit == ControlEnums.VOLTAGEUNITS.MILLIS)
     {
         return(1000.0);
     }
     return(1.0);
 }
Exemplo n.º 2
0
 // Sets the unit conversion factors for voltage (millivolts <-> volts), for either axis mapper
 public void CalculateVoltageUnitConversion(CartesianMapper <GraphingEntry> mapper, ControlEnums.VOLTAGEUNITS unit, bool xAxis)
 {
     if (xAxis)
     {
         mapper.X(entry => entry.voltage * GetVoltageUnitConversionFactor(unit));
     }
     else
     {
         mapper.Y(entry => entry.voltage * GetVoltageUnitConversionFactor(unit));
     }
 }