コード例 #1
0
ファイル: Penny.cs プロジェクト: g0orx/OpenHPSDR-SVN
        public void UpdateExtCtrl(Band band, bool tx)
        {
            if (!tx)                // if !tx ignore given band and round off to nearest band based on freq
            {
                band = Alex.AntBandFromFreq();
            }

            int idx = (int)band - (int)Band.B160M;
            int bits;

            if (idx < 0 || idx > 11)
            {
                bits = 0;
            }
            else
            {
                if (tx)
                {
                    bits = TXBitMasks[idx];
                }
                else
                {
                    bits = RXBitMasks[idx];
                }
            }
            System.Console.WriteLine("Bits: " + bits + " Band: " + (int)band);
            JanusAudio.SetPennyOCBits(bits);
        }
コード例 #2
0
 public void ExtCtrlEnable(bool enable, Band band, bool tx)
 {
     if (!enable)
     {
         JanusAudio.SetPennyOCBits(0);
     }
     else
     {
         UpdateExtCtrl(band, tx);
     }
 }
コード例 #3
0
        public void UpdateExtCtrl(Band band, bool tx)
        {
            int idx = (int)band - (int)Band.B160M;
            int bits;

            if (idx < 0 || idx > 11)
            {
                bits = 0;
            }
            else
            {
                if (tx)
                {
                    bits = TXBitMasks[idx];
                }
                else
                {
                    bits = RXBitMasks[idx];
                }
            }
            System.Console.WriteLine("Bits: " + bits + " Band: " + (int)band);
            JanusAudio.SetPennyOCBits(bits);
        }