diff options
Diffstat (limited to 'Transceiver52M/radioInterface.cpp')
-rw-r--r-- | Transceiver52M/radioInterface.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp index 1482eb6..a3c933f 100644 --- a/Transceiver52M/radioInterface.cpp +++ b/Transceiver52M/radioInterface.cpp @@ -215,5 +215,36 @@ void RadioInterface::driveReceiveRadio() { rcvCursor -= readSz; memmove(rcvBuffer,rcvBuffer+2*readSz,sizeof(float) * 2 * rcvCursor); } -} - +} + +bool RadioInterface::isUnderrun() +{ + bool retVal = underrun; + underrun = false; + + return retVal; +} + +void RadioInterface::attach(RadioDevice *wRadio, int wRadioOversampling) +{ + if (!mOn) { + mRadio = wRadio; + mRadioOversampling = SAMPSPERSYM; + } +} + +double RadioInterface::setRxGain(double dB) +{ + if (mRadio) + return mRadio->setRxGain(dB); + else + return -1; +} + +double RadioInterface::getRxGain() +{ + if (mRadio) + return mRadio->getRxGain(); + else + return -1; +} |