コード例 #1
0
 public GenericAnalogSensor(GenericAnalogSensorSettings settings) : base(settings)
 {
     zeroScaleCalibrationActual = settings.zeroScaleCalibrationActual;
     zeroScaleCalibrationValue  = settings.zeroScaleCalibrationValue;
     fullScaleCalibrationActual = settings.fullScaleCalibrationActual;
     fullScaleCalibrationValue  = settings.fullScaleCalibrationValue;
     lowPassFilterFactor        = settings.lowPassFilterFactor;
     value = zeroScaleCalibrationActual;
     sensorDisconnectedAlarmIndex = -1;
 }
コード例 #2
0
        public override GenericGadgetSettings GetGadgetSettings(string name)
        {
            CheckGadgetKey(name);
            var genericAnalogSensor = gadgets[name] as GenericAnalogSensor;
            var settings            = new GenericAnalogSensorSettings();

            settings.name    = genericAnalogSensor.name;
            settings.channel = genericAnalogSensor.channel;
            settings.zeroScaleCalibrationActual = genericAnalogSensor.zeroScaleCalibrationActual;
            settings.zeroScaleCalibrationValue  = genericAnalogSensor.zeroScaleCalibrationValue;
            settings.fullScaleCalibrationActual = genericAnalogSensor.fullScaleCalibrationActual;
            settings.fullScaleCalibrationValue  = genericAnalogSensor.fullScaleCalibrationValue;
            settings.lowPassFilterFactor        = genericAnalogSensor.lowPassFilterFactor;
            return(settings);
        }
コード例 #3
0
 protected virtual GenericAnalogSensor AnalogSensorCreater(GenericAnalogSensorSettings settings) => throw new NotImplementedException();