public BladeRFControllerDialog(BladeRFIO owner) { InitializeComponent(); _owner = owner; InitSampleRates(); InitBandwidths(); InitXB200Filters(); var devices = DeviceDisplay.GetActiveDevices(); deviceComboBox.Items.Clear(); if (devices != null) { deviceComboBox.Items.AddRange(devices); } samplerateComboBox.SelectedIndex = Utils.GetIntSetting("BladeRFSampleRate", 3); samplingModeComboBox.SelectedIndex = Utils.GetIntSetting("BladeRFSamplingMode", (int)bladerf_sampling.BLADERF_SAMPLING_INTERNAL); rxVga1GainTrackBar.Value = Utils.GetIntSetting("BladeRFVGA1Gain", 20); rxVga2GainTrackBar.Value = Utils.GetIntSetting("BladeRFVGA2Gain", 20); lnaGainTrackBar.Value = Utils.GetIntSetting("BladeRFLNAGain", (int)bladerf_lna_gain.BLADERF_LNA_GAIN_MID); fpgaTextBox.Text = Utils.GetStringSetting("BladeRFFPGA", ""); bandwidthComboBox.SelectedIndex = Utils.GetIntSetting("BladeRFBandwidth", 0); xb200Checkbox.Checked = Utils.GetBooleanSetting("BladeRFXB200Enabled"); xb200FilterCombobox.SelectedIndex = Utils.GetIntSetting("BladeRFXB200Filter", 0); labelVersion.Text = "libbladerf " + NativeMethods.bladerf_version().describe; rxVga1gainLabel.Text = rxVga1GainTrackBar.Value + " dB"; rxVga2gainLabel.Text = rxVga2GainTrackBar.Value + " dB"; lnaGainLabel.Text = String.Format("{0} dB", 3 * (lnaGainTrackBar.Value - 1));; _initialized = true; }
public BladeRFControllerDialog(BladeRFIO owner) { InitializeComponent(); _owner = owner; InitSampleRates(); InitBandwidths(); InitXB200Filters(); var devices = DeviceDisplay.GetActiveDevices(); deviceComboBox.Items.Clear(); if (devices != null) deviceComboBox.Items.AddRange(devices); samplerateComboBox.SelectedIndex = Utils.GetIntSetting("BladeRFSampleRate", 3); samplingModeComboBox.SelectedIndex = Utils.GetIntSetting("BladeRFSamplingMode", (int) bladerf_sampling.BLADERF_SAMPLING_INTERNAL); rxVga1GainTrackBar.Value = Utils.GetIntSetting("BladeRFVGA1Gain", 20); rxVga2GainTrackBar.Value = Utils.GetIntSetting("BladeRFVGA2Gain", 20); lnaGainTrackBar.Value = Utils.GetIntSetting("BladeRFLNAGain", (int) bladerf_lna_gain.BLADERF_LNA_GAIN_MID); fpgaTextBox.Text = Utils.GetStringSetting("BladeRFFPGA", ""); bandwidthComboBox.SelectedIndex = Utils.GetIntSetting("BladeRFBandwidth", 0); xb200Checkbox.Checked = Utils.GetBooleanSetting("BladeRFXB200Enabled"); xb200FilterCombobox.SelectedIndex = Utils.GetIntSetting("BladeRFXB200Filter", 0); labelVersion.Text = "libbladerf " + NativeMethods.bladerf_version().describe; rxVga1gainLabel.Text = rxVga1GainTrackBar.Value + " dB"; rxVga2gainLabel.Text = rxVga2GainTrackBar.Value + " dB"; lnaGainLabel.Text = String.Format("{0} dB", 3 * (lnaGainTrackBar.Value - 1)); ; _initialized = true; }