private void TuneFull()
        {
            if (!console.fwc_init || console.CurrentModel != Model.FLEX5000)
            {
                return;
            }
            int old_tun_pwr = 50;

            btnTuneFull.BackColor = console.ButtonSelectedColor;
            if (chkUseTUN.Checked)
            {
                console.TUN = true;
                old_tun_pwr = console.PWR;
                console.PWR = 10;
            }
            FWCATU.FullTune();
            if (chkUseTUN.Checked)
            {
                console.PWR = old_tun_pwr;
                console.TUN = false;
            }
            btnTuneFull.BackColor = SystemColors.Control;
            UpdateFeedback();
            console.FWCATUTuned();
        }
Exemplo n.º 2
0
        private void comboSWRThresh_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            double swr_thresh = 0.0;

            switch ((byte)comboSWRThresh.SelectedIndex)
            {
            case 0: swr_thresh = 1.1; break;

            case 1: swr_thresh = 1.3; break;

            case 2: swr_thresh = 1.5; break;

            case 3: swr_thresh = 1.7; break;

            case 4: swr_thresh = 2.0; break;

            case 5: swr_thresh = 2.5; break;

            case 6: swr_thresh = 3.0; break;
            }
            if (FWCATU.SWRThreshold != swr_thresh)
            {
                FWCATU.SetSWRThreshold(swr_thresh);
            }
        }
        private void comboSWRThresh_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            double swr_thresh = 0.0;

            switch ((byte)comboSWRThresh.SelectedIndex)
            {
            case 0: swr_thresh = 1.1; break;

            case 1: swr_thresh = 1.3; break;

            case 2: swr_thresh = 1.5; break;

            case 3: swr_thresh = 1.7; break;

            case 4: swr_thresh = 2.0; break;

            case 5: swr_thresh = 2.5; break;

            case 6: swr_thresh = 3.0; break;
            }
            if (FWCATU.SWRThreshold != swr_thresh)
            {
                FWCATU.SetSWRThreshold(swr_thresh);
            }

            //     byte b1, b2, b3, b4;
            //     do
            //     {
            //         FWC.ATUGetResult(out b1, out b2, out b3, out b4, 200);
            //     } while (b4 > 0);
        }
        private void radModeAuto_CheckedChanged(object sender, System.EventArgs e)
        {
            if (!console.fwc_init || console.CurrentModel != Model.FLEX5000)
            {
                return;
            }
            if (radModeAuto.Checked)
            {
                if (!FWCATU.Active)
                {
                    FWCATU.Activate(true);
                }
                if (FWCATU.AutoStatus == 0)
                {
                    FWCATU.AutoTuning(true);
                }

                if (FWC.old_atu == false)
                {
                    Debug.WriteLine("setting antenna 2...");
                    FWCATU.SelectAntenna2();
                }
                current_tune_mode = FWCATUMode.Automatic;
            }
        }
        private void radModeBypass_CheckedChanged(object sender, System.EventArgs e)
        {
            if (!console.fwc_init || console.CurrentModel != Model.FLEX5000)
            {
                return;
            }
            if (radModeBypass.Checked)
            {
                if (FWCATU.AutoStatus == 1)
                {
                    FWCATU.AutoTuning(false);
                }
                if (FWCATU.Active)
                {
                    FWCATU.Activate(false);
                }

                if (FWC.old_atu == true)
                {
                    FWC.ATUSendCmd(9, 0, 0);   //prevent
                    Thread.Sleep(200);
                }
                else
                {
                    //Debug.WriteLine("setting antenna 1...");
                    FWCATU.SelectAntenna1();
                }
                current_tune_mode = FWCATUMode.Bypass;
                console.FWCATUBypass();
            }
            grpTune.Enabled = !radModeBypass.Checked;
        }
Exemplo n.º 6
0
        public void READSWR()
        {
            SWRRUN = true;
            int old_tun_pwr = 50;

            do
            {
                if (ADJUST == 1)
                {
                    FWCATU.DecrementCapacitance();              // ADJUST set by <> buttons on FWC ATU screen
                }
                else if (ADJUST == 2)
                {
                    FWCATU.IncrementCapacitance();
                }
                else if (ADJUST == 3)
                {
                    FWCATU.DecrementInductance();
                }
                else if (ADJUST == 4)
                {
                    FWCATU.IncrementInductance();
                }


                ADJUST = 0; // reset back

                if (!console.fwc_init || console.CurrentModel != Model.FLEX5000)
                {
                    return;
                }

                btnTuneMemory.BackColor = console.ButtonSelectedColor;
                if (chkUseTUN.Checked)
                {
                    console.TUN = true;
                    //   old_tun_pwr = console.PWR;
                    //  console.PWR = 10;
                }
                FWCATU.ReadSWR(); // AT-200 sends all updated data to me
                UpdateFeedback();
            }while (ADJUST != 0); // if you push <> button before done, then keep going


            if (chkUseTUN.Checked)
            {
                //  console.PWR = old_tun_pwr;
                console.TUN = false;
            }
            btnTuneMemory.BackColor = SystemColors.Control;
            UpdateFeedback();

            SWRRUN = false; // reset to allow this thread to start again
        } // buttonTS1_Click
Exemplo n.º 7
0
 private void radModeAuto_CheckedChanged(object sender, System.EventArgs e)
 {
     if (radModeAuto.Checked)
     {
         if (!FWCATU.Active)
         {
             FWCATU.Activate(true);
         }
         if (FWCATU.AutoStatus == 0)
         {
             FWCATU.AutoTuning(true);
         }
         current_tune_mode = FWCATUMode.Automatic;
     }
 }
Exemplo n.º 8
0
 private void radModeBypass_CheckedChanged(object sender, System.EventArgs e)
 {
     if (radModeBypass.Checked)
     {
         if (FWCATU.AutoStatus == 1)
         {
             FWCATU.AutoTuning(false);
         }
         if (FWCATU.Active)
         {
             FWCATU.Activate(false);
         }
         FWC.ATUSendCmd(9, 0, 0);
         current_tune_mode = FWCATUMode.Bypass;
     }
     grpTune.Enabled = !radModeBypass.Checked;
 }
Exemplo n.º 9
0
        private void TuneFull()
        {
            int old_tun_pwr = 50;

            btnTuneFull.BackColor = console.ButtonSelectedColor;
            if (chkUseTUN.Checked)
            {
                console.TUN = true;
                old_tun_pwr = console.PWR;
                console.PWR = 10;
            }
            FWCATU.FullTune();
            if (chkUseTUN.Checked)
            {
                console.PWR = old_tun_pwr;
                console.TUN = false;
            }
            btnTuneFull.BackColor = SystemColors.Control;
            UpdateFeedback();
        }