private void setChannelButton_Click(object sender, EventArgs e) { // Parse information AD9958 selectedDDS = ddsList[deviceListBox.SelectedIndex]; ChannelSetting setting = ((IChannelSetting)channelTabControl.SelectedTab.Controls[0]).ChannelSetting; setChannel(selectedDDS, setting); }
private ChannelSetting getChannelSetting() { ChannelSetting setting = new ChannelSetting(); setting.Channel = Convert.ToInt32(comboBox1.Text); setting.Frequency = Convert.ToDouble(frequencyTextBox.Text); return(setting); }
private ChannelSetting getChannelSetting() { ChannelSetting setting = new ChannelSetting(); setting.Channel = 2; setting.Frequency = Convert.ToDouble(frequencyComboBox.Text); setting.Phase = Convert.ToDouble(phaseComboBox.Text); return(setting); }
private void setChannel(AD9958 dds, ChannelSetting Setting) { if (Setting.Channel == 2) { dds.SetTwoChannelRelativePhase(Setting.Frequency, Setting.Phase); } else { dds.SetFrequency(Setting.Channel, Setting.Frequency); } }