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/rigctld.cpp b/rigctld.cpp index a3eadae..ce05783 100644 --- a/rigctld.cpp +++ b/rigctld.cpp @@ -313,6 +313,28 @@ void rigCtlClient::socketReadyRead() } } + else if (command[0] == "fmv") { + QString resp; + + if (rigState->getChar(CURRENTVFO) == 0) { + resp.append(QString("%1").arg(rigState->getInt64(VFOAFREQ))); + } + else { + resp.append(QString("%1").arg(rigState->getInt64(VFOBFREQ))); + } + response.append(resp); + resp = ""; + response.append(QString("%1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("%1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); + + if (rigState->getChar(CURRENTVFO) == 0) { + resp.append("VFOA"); + } + else { + resp.append("VFOB"); + } + response.append(resp); + } else if (command[0] == "f" || command[0] == "get_freq") { QString resp; diff --git a/wfmain.cpp b/wfmain.cpp index 091c6b6..ee5aab2 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -2450,6 +2450,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: @@ -4213,6 +4214,7 @@ void wfmain::receiveSpectrumMode(spectrumMode spectMode) ui->spectrumModeCombo->blockSignals(false); } } + setUISpectrumControlsToMode(spectMode); } @@ -4394,6 +4396,7 @@ void wfmain::on_clearPeakBtn_clicked() if(haveRigCaps) { spectrumPeaks = QByteArray( (int)spectWidth, '\x01' ); + clearPlasmaBuffer(); } return; } @@ -4537,7 +4540,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() @@ -5237,9 +5262,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); + } + } } @@ -6654,6 +6698,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); @@ -7458,6 +7514,54 @@ void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, c 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; + } + + +} + void wfmain::on_usbControllerBtn_clicked() { if (shut != Q_NULLPTR) { diff --git a/wfmain.h b/wfmain.h index a53578d..f4f6816 100644 --- a/wfmain.h +++ b/wfmain.h @@ -666,6 +666,8 @@ private slots: void on_audioSystemServerCombo_currentIndexChanged(int index); + void on_customEdgeBtn_clicked(); + private: Ui::wfmain *ui; void closeEvent(QCloseEvent *event); @@ -793,6 +795,7 @@ private: underlay_t underlayMode = underlayNone; QMutex plasmaMutex; void resizePlasmaBuffer(int newSize); + void clearPlasmaBuffer(); double plotFloor = 0; double plotCeiling = 160; @@ -807,6 +810,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 b765db3..5cb5df9 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 @@ -4833,7 +4843,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 4bfcd2c..d155633 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