Ejemplo n.º 1
0
        public bool IsCarrierFrequencySupported(int carrierFrequency)
        {
            if (_irManager == null)
            {
                return(false);
            }

            var frequencyRanges = _irManager.GetCarrierFrequencies();

            foreach (var range in frequencyRanges)
            {
                if (range.MinFrequency <= carrierFrequency && carrierFrequency <= range.MaxFrequency)
                {
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
        void mGetFreqsClickListener(object sender, EventArgs e)
        {
            var sb = new StringBuilder();

            if (!mCIR.HasIrEmitter)
            {
                mFreqsText.Text = "No IR Emitter found!";
                Log.Error(TAG, "No IR Emitter found!\n");
                return;
            }

            // Get the available carrier frequency ranges
            ConsumerIrManager.CarrierFrequencyRange[] freqs = mCIR.GetCarrierFrequencies();
            sb.Append("IR Carrier Frequencies:\n");
            foreach (var range in freqs)
            {
                sb.Append(string.Format("    %d - %d\n", range.MinFrequency, range.MaxFrequency));
            }
            mFreqsText.Text = sb.ToString();
        }