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; }
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); }
protected virtual GenericAnalogSensor AnalogSensorCreater(GenericAnalogSensorSettings settings) => throw new NotImplementedException();