diff --git a/CHANGELOG b/CHANGELOG
index 6335c22..2008924 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,10 +1,31 @@
# CHANGELOG
+- 20220920
+
+ Added dialog box to the toFixed button where an edge can be selected.
+
+ updated to v1.47
+
+- 20220918
+
+ Added controls for custom scope edges, hide/show scope controls
+ depending upon the scope mode the radio reports.
+
+ Fixed clear peaks button to work with the plasma underlay.
+
+ Make sure both audio system button are disabled when connected to radio and enabled when not.
+
+ Remove password from log!
+
+ Fix server user handling
+
+ updated to v1.46
+
- 20220918
merged bits from log branch into master
- updated to v.1.45
+ updated to v1.45
- 20220917
diff --git a/WHATSNEW b/WHATSNEW
index f40f71c..6b0b567 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -30,6 +30,13 @@ The following highlights are in this 1.41-release:
moved connect button and added cancel option
add enable/disable audioSystemServerCombo
Fixed bug where the frequency dial skipped extra when crossing zero.
++ 1.46 Added controls for custom scope edges, hide/show scope controls
+ depending upon the scope mode the radio reports.
+ Fixed clear peaks button to work with the plasma underlay.
+ both audio system button are disabled when connected to radio and enabled when not.
+ Remove password from log
+ Fix server user handling
++ 1.47 Added dialog box to the toFixed button where an edge can be selected.
Notes:
diff --git a/aboutbox.cpp b/aboutbox.cpp
index 03715c1..4c3549e 100644
--- a/aboutbox.cpp
+++ b/aboutbox.cpp
@@ -15,9 +15,10 @@ aboutbox::aboutbox(QWidget *parent) :
ui->topText->setText("wfview version " + QString(WFVIEW_VERSION));
QString head = QString("
");
- QString copyright = QString("Copyright 2017-2022 Elliott H. Liggett, W6EL. All rights reserved. wfview source code is licensed under the GNU GPLv3.");
+ QString copyright = QString("Copyright 2017-2022 Elliott H. Liggett, W6EL. All rights reserved.
wfview source code is licensed under the GNU GPLv3.");
QString nacode = QString("
Networking, audio, rigctl server, and much more written by Phil Taylor, M0VSE");
- QString doctest = QString("
Testing, documentation, bug fixes, and development mentorship from
Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E.");
+ QString scm = QString("
Source code and issues managed by Roeland Jansen, PA3MET");
+ QString doctest = QString("
Testing and development mentorship from Jim Nijkamp, PA8E.");
QString dedication = QString("
This version of wfview is dedicated to the ones we lost.");
@@ -35,7 +36,7 @@ aboutbox::aboutbox(QWidget *parent) :
QString support = QString("
For support, please visit the official wfview support forum.");
QString gitcodelink = QString("").arg(GITSHORT);
- QString contact = QString("
email W6EL: kilocharlie8@gmail.com");
+ QString contact = QString("
email W6EL: kilocharlie8 at gmail.com");
QString buildInfo = QString("
Build " + gitcodelink + QString(GITSHORT) + " on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
QString end = QString("");
@@ -85,7 +86,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
// String it all together:
- QString aboutText = head + copyright + "\n" + nacode + "\n" + doctest + dedication + wfviewcommunityack;
+ QString aboutText = head + copyright + "\n" + nacode + "\n" + scm + "\n" + doctest + dedication + wfviewcommunityack;
aboutText.append(website + "\n" + donate + "\n"+ docs + support + contact +"\n");
aboutText.append("\n" + ssCredit + "\n" + rsCredit + "\n");
diff --git a/wfmain.cpp b/wfmain.cpp
index 5816a66..fe5f46f 100644
--- a/wfmain.cpp
+++ b/wfmain.cpp
@@ -2158,6 +2158,7 @@ void wfmain::showHideSpectrum(bool show)
ui->wfLengthSlider->setEnabled(show);
ui->wfthemeCombo->setVisible(show);
ui->toFixedBtn->setVisible(show);
+ ui->customEdgeBtn->setVisible(show);
ui->clearPeakBtn->setVisible(show);
// And the labels:
@@ -3872,6 +3873,7 @@ void wfmain::receiveSpectrumMode(spectrumMode spectMode)
ui->spectrumModeCombo->blockSignals(false);
}
}
+ setUISpectrumControlsToMode(spectMode);
}
@@ -4053,6 +4055,7 @@ void wfmain::on_clearPeakBtn_clicked()
if(haveRigCaps)
{
spectrumPeaks = QByteArray( (int)spectWidth, '\x01' );
+ clearPlasmaBuffer();
}
return;
}
@@ -4196,7 +4199,29 @@ void wfmain::on_fCEbtn_clicked()
void wfmain::on_spectrumModeCombo_currentIndexChanged(int index)
{
- emit setScopeMode(static_cast(ui->spectrumModeCombo->itemData(index).toInt()));
+ spectrumMode smode = static_cast(ui->spectrumModeCombo->itemData(index).toInt());
+ emit setScopeMode(smode);
+ setUISpectrumControlsToMode(smode);
+}
+
+void wfmain::setUISpectrumControlsToMode(spectrumMode smode)
+{
+ if((smode==spectModeCenter) || (smode==spectModeScrollC))
+ {
+ ui->specEdgeLabel->hide();
+ ui->scopeEdgeCombo->hide();
+ ui->customEdgeBtn->hide();
+ ui->toFixedBtn->show();
+ ui->specSpanLabel->show();
+ ui->scopeBWCombo->show();
+ } else {
+ ui->specEdgeLabel->show();
+ ui->scopeEdgeCombo->show();
+ ui->customEdgeBtn->show();
+ ui->toFixedBtn->hide();
+ ui->specSpanLabel->hide();
+ ui->scopeBWCombo->hide();
+ }
}
void wfmain::on_fEnterBtn_clicked()
@@ -4890,9 +4915,28 @@ void wfmain::on_vspCombo_currentIndexChanged(int value)
void wfmain::on_toFixedBtn_clicked()
{
- emit setScopeFixedEdge(oldLowerFreq, oldUpperFreq, ui->scopeEdgeCombo->currentIndex()+1);
- emit setScopeEdge(ui->scopeEdgeCombo->currentIndex()+1);
- issueDelayedCommand(cmdScopeFixedMode);
+ int currentEdge = ui->scopeEdgeCombo->currentIndex();
+ bool dialogOk = false;
+ bool numOk = false;
+
+ QStringList edges;
+ edges << "1" << "2" << "3" << "4";
+
+ QString item = QInputDialog::getItem(this, "Select Edge", "Edge to replace:", edges, currentEdge, false, &dialogOk);
+
+ if(dialogOk)
+ {
+ int edge = QString(item).toInt(&numOk,10);
+ if(numOk)
+ {
+ emit setScopeFixedEdge(oldLowerFreq, oldUpperFreq, edge);
+ emit setScopeEdge(edge);
+ ui->scopeEdgeCombo->blockSignals(true);
+ ui->scopeEdgeCombo->setCurrentIndex(edge-1);
+ ui->scopeEdgeCombo->blockSignals(false);
+ issueDelayedCommand(cmdScopeFixedMode);
+ }
+ }
}
@@ -6307,6 +6351,18 @@ void wfmain::resizePlasmaBuffer(int newSize)
plasmaMutex.unlock();
}
+void wfmain::clearPlasmaBuffer()
+{
+ QByteArray empty((int)spectWidth, '\x01');
+ plasmaMutex.lock();
+ int pSize = spectrumPlasma.size();
+ for(int i=0; i < pSize; i++)
+ {
+ spectrumPlasma[i] = empty;
+ }
+ plasmaMutex.unlock();
+}
+
void wfmain::on_underlayNone_toggled(bool checked)
{
ui->underlayBufferSlider->setDisabled(checked);
@@ -7110,3 +7166,51 @@ void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, c
logStringBuffer.push_front(text);
logTextMutex.unlock();
}
+
+void wfmain::on_customEdgeBtn_clicked()
+{
+ double lowFreq = oldLowerFreq;
+ double highFreq = oldUpperFreq;
+ QString freqstring = QString("%1, %2").arg(lowFreq).arg(highFreq);
+ bool ok;
+
+ QString userFreq = QInputDialog::getText(this, "Scope Edges",
+ "Please enter desired scope edges, in MHz, \
+with a comma between the low and high range.",
+ QLineEdit::Normal, freqstring, &ok);
+ if(!ok)
+ return;
+
+ QString clean = userFreq.trimmed().replace(" ", "");
+ QStringList freqs = clean.split(",");
+ if(freqs.length() == 2)
+ {
+ lowFreq = QString(freqs.at(0)).toDouble(&ok);
+ if(ok)
+ {
+ highFreq = QString(freqs.at(1)).toDouble(&ok);
+ if(ok)
+ {
+ qDebug(logGui()) << "setting edge to: " << lowFreq << ", " << highFreq << ", edge num: " << ui->scopeEdgeCombo->currentIndex() + 1;
+ emit setScopeFixedEdge(lowFreq, highFreq, ui->scopeEdgeCombo->currentIndex() + 1);
+ return;
+ }
+ }
+ goto errMsg;
+ } else {
+ goto errMsg;
+ }
+
+errMsg:
+ {
+ QMessageBox URLmsgBox;
+ URLmsgBox.setText("Error, could not interpret your input.\
+
Please make sure to place a comma between the frequencies.\
+
For example: '7.200, 7.300'");
+ URLmsgBox.exec();
+
+ return;
+ }
+
+
+}
diff --git a/wfmain.h b/wfmain.h
index c96965f..f4ff6a2 100644
--- a/wfmain.h
+++ b/wfmain.h
@@ -645,6 +645,8 @@ private slots:
void on_audioSystemServerCombo_currentIndexChanged(int index);
+ void on_customEdgeBtn_clicked();
+
private:
Ui::wfmain *ui;
void closeEvent(QCloseEvent *event);
@@ -771,6 +773,7 @@ private:
underlay_t underlayMode = underlayNone;
QMutex plasmaMutex;
void resizePlasmaBuffer(int newSize);
+ void clearPlasmaBuffer();
double plotFloor = 0;
double plotCeiling = 160;
@@ -785,6 +788,7 @@ private:
bool onFullscreen;
bool freqTextSelected;
void checkFreqSel();
+ void setUISpectrumControlsToMode(spectrumMode smode);
double oldLowerFreq;
double oldUpperFreq;
diff --git a/wfmain.ui b/wfmain.ui
index dffab18..e31ba7c 100644
--- a/wfmain.ui
+++ b/wfmain.ui
@@ -18,7 +18,7 @@
-
- 3
+ 0
@@ -117,6 +117,16 @@
+ -
+
+
+ Define a custom (fixed) scope edge
+
+
+ Custom Edge
+
+
+
-
@@ -3333,8 +3343,8 @@
0
0
- 194
- 563
+ 204
+ 582
@@ -4826,7 +4836,7 @@
-
+
diff --git a/wfserver.pro b/wfserver.pro
index 658d0a0..c48624d 100644
--- a/wfserver.pro
+++ b/wfserver.pro
@@ -13,7 +13,7 @@ TEMPLATE = app
CONFIG += console
-DEFINES += WFVIEW_VERSION=\\\"1.45\\\"
+DEFINES += WFVIEW_VERSION=\\\"1.46\\\"
DEFINES += BUILD_WFSERVER
diff --git a/wfview.pro b/wfview.pro
index 31d9cc4..f60af98 100644
--- a/wfview.pro
+++ b/wfview.pro
@@ -11,7 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
TARGET = wfview
TEMPLATE = app
-DEFINES += WFVIEW_VERSION=\\\"1.45\\\"
+DEFINES += WFVIEW_VERSION=\\\"1.46\\\"
DEFINES += BUILD_WFVIEW