public PressureComponent(byte boardID, string graphicID, string name, int maxPressure, Calibrator calibrator, Uncalibrator uncalibrator) : base(boardID, graphicID, name) { _maxPressure = maxPressure; _calibrator = calibrator; _uncalibrator = uncalibrator; }
public PressureComponent(byte boardID, string graphicID, string name, int maxPressure) : base(boardID, graphicID, name) { _maxPressure = maxPressure; _calibrator = x => { return(_maxPressure * (x - _minADC) / (_maxADC - _minADC)); }; _uncalibrator = x => { return((x * (_maxADC - _minADC) / _maxPressure) + _minADC); }; }