void Init() { _Calibrations = new Calibration[ChannelCount * GainCount]; for (int i = 0; i < _Calibrations.Length; i++) { _Calibrations[i].Gain = 1; _Calibrations[i].Offset = 0; } }
public void Set(int channel, int gain, Calibration calibration) { #region /Проверка аргументов/ if (channel < 0 || channel >= ChannelCount) throw new ArgumentOutOfRangeException("channel"); if (gain < 0 || gain >= GainCount) throw new ArgumentOutOfRangeException("gain"); #endregion /Проверка аргументов/ _Calibrations[ChannelCount * gain + channel] = calibration; }