From 5166b1e0ddf87dc15a112c89c3998334ea5afd45 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Thu, 23 Aug 2018 13:10:20 -0400 Subject: [PATCH] Block lower 500Hz from being used to allow frequency separation --- FrequencyList.cpp | 18 +++++++++--------- mainwindow.cpp | 3 +++ plotter.cpp | 11 ++++++++++- widegraph.cpp | 8 +++++--- widegraph.ui | 3 +++ 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/FrequencyList.cpp b/FrequencyList.cpp index a7c696d..a40ac0f 100644 --- a/FrequencyList.cpp +++ b/FrequencyList.cpp @@ -27,15 +27,15 @@ namespace FrequencyList_v2::FrequencyItems const default_frequency_list = { { 1842500, Modes::FT8CALL, IARURegions::ALL}, // 2.5 above - { 3578500, Modes::FT8CALL, IARURegions::ALL}, // 5.5 above - { 7078500, Modes::FT8CALL, IARURegions::ALL}, // 4.5 above - {10130500, Modes::FT8CALL, IARURegions::ALL}, // 5.5 below - {14078500, Modes::FT8CALL, IARURegions::ALL}, // 4.5 above - {18104500, Modes::FT8CALL, IARURegions::ALL}, // 4.5 above - {21078500, Modes::FT8CALL, IARURegions::ALL}, // 4.5 above - {24922500, Modes::FT8CALL, IARURegions::ALL}, // 9.5 above - {28078500, Modes::FT8CALL, IARURegions::ALL}, // 4.5 above - {50318500, Modes::FT8CALL, IARURegions::ALL}, // 5.5 above + { 3578000, Modes::FT8CALL, IARURegions::ALL}, // 5 above + { 7078000, Modes::FT8CALL, IARURegions::ALL}, // 4 above + {10130000, Modes::FT8CALL, IARURegions::ALL}, // 6 below + {14078000, Modes::FT8CALL, IARURegions::ALL}, // 4 above + {18104000, Modes::FT8CALL, IARURegions::ALL}, // 4 above + {21078000, Modes::FT8CALL, IARURegions::ALL}, // 4 above + {24922000, Modes::FT8CALL, IARURegions::ALL}, // 9 above + {28078000, Modes::FT8CALL, IARURegions::ALL}, // 4 above + {50318000, Modes::FT8CALL, IARURegions::ALL}, // 5 above }; } diff --git a/mainwindow.cpp b/mainwindow.cpp index 381944e..9f06e85 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7762,6 +7762,9 @@ void MainWindow::setFreq4(int rxFreq, int txFreq) txFreq = rxFreq; } + rxFreq = max(500, rxFreq); + txFreq = max(500, txFreq); + m_previousFreq = currentFreqOffset(); if (ui->RxFreqSpinBox->isEnabled ()) ui->RxFreqSpinBox->setValue(rxFreq); diff --git a/plotter.cpp b/plotter.cpp index bb4cd5a..1c0fd69 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -329,6 +329,7 @@ void CPlotter::DrawOverlay() //DrawOverlay() QPen penOrange(QColor(255,165,0),3); QPen penGreen(Qt::green, 3); //Mark Tol range with green line QPen penRed(Qt::red, 3); //Mark Tx freq with red + QPen penYellow(QColor(243, 156, 18), 3); //Mark band block freq with this pen QPainter painter(&m_OverlayPixmap); painter.initFrom(this); QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient @@ -396,7 +397,7 @@ void CPlotter::DrawOverlay() //DrawOverlay() if(m_freqPerDiv==200) minor=4; for( int i=1; i=0) { + painter0.setPen(penYellow); //Mark bottom of sub-band + painter0.drawLine(x1,26,x2,26); + painter0.drawLine(x1,28,x2,28); + } + if(m_mode=="FT8"){ int fwidth=XfromFreq(m_rxFreq+bw)-XfromFreq(m_rxFreq); QPainter overPainter(&m_FullOverlayPixmap); diff --git a/widegraph.cpp b/widegraph.cpp index 6ca272f..1cfbcd1 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -80,14 +80,14 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) : ui->widePlot->setBinsPerPixel(nbpp); ui->sbPercent2dPlot->setValue(m_Percent2DScreen); ui->widePlot->SetPercent2DScreen(m_Percent2DScreen); - ui->widePlot->setStartFreq(m_settings->value("StartFreq",0).toInt()); + ui->widePlot->setStartFreq(m_settings->value("StartFreq", 500).toInt()); ui->fStartSpinBox->setValue(ui->widePlot->startFreq()); m_waterfallPalette=m_settings->value("WaterfallPalette","Default").toString(); m_userPalette = WFPalette {m_settings->value("UserPalette").value ()}; m_fMinPerBand = m_settings->value ("FminPerBand").toHash (); setRxRange (); - ui->controls_widget->setVisible(!m_settings->value("HideControls", true).toBool()); - ui->cbControls->setChecked(!m_settings->value("HideControls", true).toBool()); + ui->controls_widget->setVisible(!m_settings->value("HideControls", false).toBool()); + ui->cbControls->setChecked(!m_settings->value("HideControls", false).toBool()); } int index=0; @@ -212,6 +212,8 @@ void WideGraph::on_offsetSpinBox_valueChanged(int n){ return; } + n = qMax(500, n); + setRxFreq(n); setTxFreq(n); setFreq2(n, n); diff --git a/widegraph.ui b/widegraph.ui index 1d7e9a5..6992aa7 100644 --- a/widegraph.ui +++ b/widegraph.ui @@ -177,6 +177,9 @@ 100 + + 500 +