From 9c7cb0a49ac55a751203684c8a54bb95eee878a0 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 8 Mar 2020 22:04:58 +0100 Subject: [PATCH] LimeRFE USB: added cellular band 3 --- sdrbase/limerfe/limerfecontroller.cpp | 15 +++++++++++++++ sdrbase/limerfe/limerfecontroller.h | 1 + sdrbase/limerfe/limerfeusbcalib.h | 1 + sdrgui/limerfegui/limerfeusbdialog.cpp | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/sdrbase/limerfe/limerfecontroller.cpp b/sdrbase/limerfe/limerfecontroller.cpp index 90a29e5ae..57e653377 100644 --- a/sdrbase/limerfe/limerfecontroller.cpp +++ b/sdrbase/limerfe/limerfecontroller.cpp @@ -239,6 +239,11 @@ void LimeRFEController::settingsToState(const LimeRFESettings& settings) m_rfeBoardState.channelIDRX = RFE_CID_CELL_BAND02; m_rfeBoardState.mode = RFE_MODE_TXRX; } + else if (settings.m_rxCellularChannel == CellularBand3) + { + m_rfeBoardState.channelIDRX = RFE_CID_CELL_BAND03; + m_rfeBoardState.mode = RFE_MODE_TXRX; + } else if (settings.m_rxCellularChannel == CellularBand38) { m_rfeBoardState.channelIDRX = RFE_CID_CELL_BAND38; @@ -367,6 +372,11 @@ void LimeRFEController::stateToSettings(LimeRFESettings& settings) settings.m_rxChannels = ChannelsCellular; settings.m_rxCellularChannel = CellularBand2; } + else if (m_rfeBoardState.channelIDRX == RFE_CID_CELL_BAND03) + { + settings.m_rxChannels = ChannelsCellular; + settings.m_rxCellularChannel = CellularBand3; + } else if (m_rfeBoardState.channelIDRX == RFE_CID_CELL_BAND07) { settings.m_rxChannels = ChannelsCellular; @@ -449,6 +459,11 @@ void LimeRFEController::stateToSettings(LimeRFESettings& settings) settings.m_txChannels = ChannelsCellular; settings.m_txCellularChannel = CellularBand2; } + else if (m_rfeBoardState.channelIDTX == RFE_CID_CELL_BAND03) + { + settings.m_txChannels = ChannelsCellular; + settings.m_txCellularChannel = CellularBand3; + } else if (m_rfeBoardState.channelIDTX == RFE_CID_CELL_BAND07) { settings.m_txChannels = ChannelsCellular; diff --git a/sdrbase/limerfe/limerfecontroller.h b/sdrbase/limerfe/limerfecontroller.h index b5a309bc1..000ed15ca 100644 --- a/sdrbase/limerfe/limerfecontroller.h +++ b/sdrbase/limerfe/limerfecontroller.h @@ -56,6 +56,7 @@ public: { CellularBand1, CellularBand2, + CellularBand3, CellularBand7, CellularBand38 }; diff --git a/sdrbase/limerfe/limerfeusbcalib.h b/sdrbase/limerfe/limerfeusbcalib.h index 09486e2ce..80f419575 100644 --- a/sdrbase/limerfe/limerfeusbcalib.h +++ b/sdrbase/limerfe/limerfeusbcalib.h @@ -44,6 +44,7 @@ public: HAM_3300_3500MHz, CellularBand1, CellularBand2, + CellularBand3, CellularBand7, CellularBand38 }; diff --git a/sdrgui/limerfegui/limerfeusbdialog.cpp b/sdrgui/limerfegui/limerfeusbdialog.cpp index 88f4cc53a..f5ca9603c 100644 --- a/sdrgui/limerfegui/limerfeusbdialog.cpp +++ b/sdrgui/limerfegui/limerfeusbdialog.cpp @@ -234,6 +234,7 @@ void LimeRFEUSBDialog::setRxChannels() { ui->rxChannel->addItem("Band1"); ui->rxChannel->addItem("Band2"); + ui->rxChannel->addItem("Band3"); ui->rxChannel->addItem("Band7"); ui->rxChannel->addItem("Band38"); ui->rxChannel->setCurrentIndex((int) m_settings.m_rxCellularChannel); @@ -314,6 +315,7 @@ void LimeRFEUSBDialog::setTxChannels() { ui->txChannel->addItem("Band1"); ui->txChannel->addItem("Band2"); + ui->txChannel->addItem("Band3"); ui->txChannel->addItem("Band7"); ui->txChannel->addItem("Band38"); ui->txChannel->setCurrentIndex((int) m_settings.m_txCellularChannel); @@ -402,6 +404,9 @@ int LimeRFEUSBDialog::getPowerCorectionIndex() case LimeRFEController::CellularBand2: range = LimeRFEUSBCalib::CellularBand2; break; + case LimeRFEController::CellularBand3: + range = LimeRFEUSBCalib::CellularBand3; + break; case LimeRFEController::CellularBand7: range = LimeRFEUSBCalib::CellularBand7; break;