Ejemplo n.º 1
0
        public static void SetFilter(int low, int high)     // changes yt7pwr
        {
            try
            {
                rx_filter_low_cut  = low;
                rx_filter_high_cut = high;
                if (not_pan)
                {
                    UpdateRXDisplayVars();
                }

                int i = 0;
                if (rx_filter_high_cut - rx_filter_low_cut >= 10)
                {
                    i = DttSP.SetRXFilter(0, 0, rx_filter_low_cut, rx_filter_high_cut);
                }

                if (CurrentMode == DSPMode.FMN)
                {
                    DttSP.FMreload(0, 0, low, high, high - low, 0);
                    DttSP.FMreload(0, 1, low, high, high - low, 0);
                }
                else if (CurrentMode == DSPMode.WFM)
                {
                    DttSP.FMreload(0, 0, low, high, (high - low), 1);
                    DttSP.FMreload(0, 1, low, high, (high - low), 1);
                }

                /*if (i != 0)
                 *  MessageBox.Show("Error in DttSP.SetRXFilters (SetFilter): " + i);*/
            }
            catch (Exception ex)
            {
                Debug.Write(ex.ToString());
            }
        }