Merge branch 'master' into shuttle

half-duplex
Phil Taylor 2022-09-20 22:53:26 +01:00
commit 2f35e009e9
9 zmienionych plików z 184 dodań i 15 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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:

Wyświetl plik

@ -15,9 +15,10 @@ aboutbox::aboutbox(QWidget *parent) :
ui->topText->setText("wfview version " + QString(WFVIEW_VERSION));
QString head = QString("<html><head></head><body>");
QString copyright = QString("Copyright 2017-2022 Elliott H. Liggett, W6EL. All rights reserved. wfview source code is <a href=\"https://gitlab.com/eliggett/wfview/-/blob/master/LICENSE\">licensed</a> under the GNU GPLv3.");
QString copyright = QString("Copyright 2017-2022 Elliott H. Liggett, W6EL. All rights reserved.<br/>wfview source code is <a href=\"https://gitlab.com/eliggett/wfview/-/blob/master/LICENSE\">licensed</a> under the GNU GPLv3.");
QString nacode = QString("<br/><br/>Networking, audio, rigctl server, and much more written by Phil Taylor, M0VSE");
QString doctest = QString("<br/><br/>Testing, documentation, bug fixes, and development mentorship from<br/>Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E.");
QString scm = QString("<br/><br/>Source code and issues managed by Roeland Jansen, PA3MET");
QString doctest = QString("<br/><br/>Testing and development mentorship from Jim Nijkamp, PA8E.");
QString dedication = QString("<br/><br/>This version of wfview is dedicated to the ones we lost.");
@ -35,7 +36,7 @@ aboutbox::aboutbox(QWidget *parent) :
QString support = QString("<br/><br/>For support, please visit <a href=\"https://forum.wfview.org/\">the official wfview support forum</a>.");
QString gitcodelink = QString("<a href=\"https://gitlab.com/eliggett/wfview/-/tree/%1\" style=\"color: cyan;\">").arg(GITSHORT);
QString contact = QString("<br/>email W6EL: kilocharlie8@gmail.com");
QString contact = QString("<br/>email W6EL: kilocharlie8 at gmail.com");
QString buildInfo = QString("<br/><br/>Build " + gitcodelink + QString(GITSHORT) + "</a> on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
QString end = QString("</body></html>");
@ -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");

Wyświetl plik

@ -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;

Wyświetl plik

@ -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<spectrumMode>(ui->spectrumModeCombo->itemData(index).toInt()));
spectrumMode smode = static_cast<spectrumMode>(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.\
<br/>Please make sure to place a comma between the frequencies.\
<br/>For example: '7.200, 7.300'");
URLmsgBox.exec();
return;
}
}
void wfmain::on_usbControllerBtn_clicked()
{
if (shut != Q_NULLPTR) {

Wyświetl plik

@ -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;

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">
@ -117,6 +117,16 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="customEdgeBtn">
<property name="toolTip">
<string>Define a custom (fixed) scope edge</string>
</property>
<property name="text">
<string>Custom Edge</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="toFixedBtn">
<property name="toolTip">
@ -3333,8 +3343,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>194</width>
<height>563</height>
<width>204</width>
<height>582</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@ -4833,7 +4843,7 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="underlayButtonGroup"/>
<buttongroup name="buttonGroup"/>
<buttongroup name="underlayButtonGroup"/>
</buttongroups>
</ui>

Wyświetl plik

@ -13,7 +13,7 @@ TEMPLATE = app
CONFIG += console
DEFINES += WFVIEW_VERSION=\\\"1.45\\\"
DEFINES += WFVIEW_VERSION=\\\"1.46\\\"
DEFINES += BUILD_WFSERVER

Wyświetl plik

@ -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