示例#1
0
        private HIDAnt StringToAnt(string s)
        {
            HIDAnt ant = HIDAnt.PA;

            switch (s)
            {
            case "PA":          ant = HIDAnt.PA; break;

            case "XVTX/COM":    ant = HIDAnt.XVTX_COM; break;

            case "XVRX":        ant = HIDAnt.XVRX; break;
            }
            return(ant);
        }
示例#2
0
        private string AntToString(HIDAnt ant)
        {
            string ret_val = "";

            switch (ant)
            {
            case HIDAnt.PA:         ret_val = "PA"; break;

            case HIDAnt.XVTX_COM:   ret_val = "XVTX/COM"; break;

            case HIDAnt.XVRX:       ret_val = "XVRX"; break;
            }
            return(ret_val);
        }
示例#3
0
 private string HIDAntenna2String(HIDAnt ant)
 {
     string ans = string.Empty;
     switch (ant)
     {
         case HIDAnt.PA:
             ans = "0";
             break;
         case HIDAnt.XVTX_COM:
             ans = "1";
             break;
         case HIDAnt.XVRX:
             ans = "2";
             break;
         case HIDAnt.BITE:
             ans = "3";
             break;
     }
     return ans;
 }
示例#4
0
文件: setup.cs 项目: wa1gon/PowerSDR
		private void ckEnableSigGen_CheckedChanged(object sender, System.EventArgs e)
		{
			if(console.fwc_init && (console.CurrentModel == Model.FLEX5000 || console.CurrentModel == Model.FLEX3000))
			{
				if(ckEnableSigGen.Checked)
				{
					old_ant = console.RX1Ant;
					console.RX1Ant = FWCAnt.SIG_GEN;
				}
				else console.RX1Ant = old_ant;
				FWC.SetTest(ckEnableSigGen.Checked);
				FWC.SetGen(ckEnableSigGen.Checked);
				FWC.SetSig(ckEnableSigGen.Checked);

                if (!console.FullDuplex)
                    FWC.SetFullDuplex(ckEnableSigGen.Checked);
			}
            else if (console.hid_init && console.CurrentModel == Model.FLEX1500)
            {
                if (ckEnableSigGen.Checked)
                {
                    old_hid_ant = console.RXAnt1500;
                    console.RXAnt1500 = HIDAnt.BITE;
                }
                else console.RXAnt1500 = old_hid_ant;
                Thread.Sleep(10);

                USBHID.SetGen(ckEnableSigGen.Checked); Thread.Sleep(10);
                USBHID.SetQSE(ckEnableSigGen.Checked); Thread.Sleep(10);
                if (ckEnableSigGen.Checked)
                {
                    USBHID.SetPreamp(FLEX1500PreampMode.ZERO);
                    USBHID.SetTest(true); Thread.Sleep(20);
                }
                else
                {
                    USBHID.SetTest(false); Thread.Sleep(20);
                    console.RX1PreampMode = console.RX1PreampMode;
                }
            }
		}
示例#5
0
		private string AntToString(HIDAnt ant)
		{
			string ret_val = "";
			switch(ant)
			{
				case HIDAnt.PA:         ret_val = "PA"; break;
                case HIDAnt.XVTX_COM:   ret_val = "XVTX/COM"; break;
                case HIDAnt.XVRX:       ret_val = "XVRX"; break;
			}
			return ret_val;
		}