From 58032b6ae45502bc2c201d7e73ec80a4396de19b Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 18 Jul 2018 14:26:45 -0400 Subject: [PATCH] Restrict low offset when not in split mode --- mainwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 774d417..2c95278 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5660,7 +5660,7 @@ void MainWindow::prepareBeacon(){ } int bw = 50 + 5; - int f = ui->TxFreqSpinBox->value(); + int f = ui->TxFreqSpinBox->value(); // TODO: jsherer - ew if(!isFreqOffsetFree(f, bw)){ f = findFreeFreqOffset(250, 1500, bw); } @@ -7135,6 +7135,13 @@ void MainWindow::setFreq4(int rxFreq, int txFreq) if(rxFreq != txFreq){ txFreq = rxFreq; } + + // Don't go below 450 Hz if not in split mode + if(!m_config.split_mode()){ + rxFreq = qMax(450, rxFreq); + txFreq = qMax(450, txFreq); + } + if (ui->RxFreqSpinBox->isEnabled ()) ui->RxFreqSpinBox->setValue(rxFreq); ui->labDialFreqOffset->setText(QString("%1 Hz").arg(rxFreq)); if(m_mode.startsWith ("WSPR")) {