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); }
public void ExtCtrlEnable(bool enable, Band band, bool tx) { if (!enable) { JanusAudio.SetPennyOCBits(0); } else { UpdateExtCtrl(band, tx); } }
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); }