Merge branch 'master' into audio-enhance

merge-requests/5/head
Phil Taylor 2021-07-08 09:32:22 +01:00
commit 29ef8d482d
12 zmienionych plików z 524 dodań i 55 usunięć

Wyświetl plik

@ -1,6 +1,27 @@
# CHANGELOG
- 20210706
Local af gain now has anti-log audio pot taper.
Only start audio when stream is ready
- 20210705
Added transceiver adjustment window show code, for the debug button only
currently.
Added window title text change to show radio model. Needs to be checked
cross-platform. On Linux Mint, displays: "IC-7300 -- wfview"
Applying setup.volume within audio handler if the audio handled is an
output. Added this to the init function.
waterfall theme is now saved.
Added local af gain and wf length to the preferences.
- 20210702
fixed small error where the tx latency was not copied in the UI

Wyświetl plik

@ -12,3 +12,5 @@ The following highlights are in this dot-release:
wf display disappears when there is no wf capable rig
IC R8600 support improved
for older rigs added a polling timing box to keep stuff keeping smooth
Local af gain now has anti-log audio pot taper.

111
aboutbox.cpp 100644
Wyświetl plik

@ -0,0 +1,111 @@
#include "aboutbox.h"
#include "ui_aboutbox.h"
aboutbox::aboutbox(QWidget *parent) :
QWidget(parent),
ui(new Ui::aboutbox)
{
ui->setupUi(this);
setWindowTitle("About wfview");
setWindowIcon(QIcon(":resources/wfview.png"));
ui->logoBtn->setIcon(QIcon(":resources/wfview.png"));
ui->logoBtn->setStyleSheet("Text-align:left");
ui->topText->setText("wfview version 1.1a");
QString head = QString("<html><head></head><body>");
QString copyright = QString("Copyright 2017-2021 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 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 ssCredit = QString("<br/><br/>Stylesheet <a href=\"https://github.com/ColinDuquesnoy/QDarkStyleSheet/tree/master/qdarkstyle\" style=\"color: cyan;\">qdarkstyle</a> used under MIT license, stored in /usr/share/wfview/stylesheets/.");
QString website = QString("<br/><br/>Please visit <a href=\"https://wfview.org/\" style=\"color: cyan;\">https://wfview.org/</a> for the latest information.");
QString docs = QString("<br/><br/>Be sure to check the <a href=\"https://wfview.org/wfview-user-manual/\" style=\"color: cyan;\">User Manual</a> and <a href=\"https://forum.wfview.org/\" style=\"color: cyan;\">the Forum</a> if you have any questions.");
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 buildInfo = QString("<br/><br/>Build " + gitcodelink + QString(GITSHORT) + "</a> on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
QString end = QString("</body></html>");
// Short credit strings:
QString rsCredit = QString("<br/><br/><a href=\"https://www.speex.org/\" style=\"color: cyan;\">Speex</a> Resample library Copyright 2003-2008 Jean-Marc Valin");
#if defined(RTAUDIO)
QString rtaudiocredit = QString("<br/><br/>RT Audio, from <a href=\"https://www.music.mcgill.ca/~gary/rtaudio/index.html\">Gary P. Scavone</a>");
#endif
#if defined(PORTAUDIO)
QString portaudiocredit = QString("<br/><br/>Port Audio, from <a href=\"http://portaudio.com\">The Port Audio Community</a>");
#endif
QString qcpcredit = QString("<br/><br/>The waterfall and spectrum plot graphics use QCustomPlot, from <a href=\"https://www.qcustomplot.com/\">Emanuel Eichhammer</a>");
QString qtcredit = QString("<br/><br/>This copy of wfview was built against Qt version %1").arg(QT_VERSION_STR);
// Acknowledgement:
QString wfviewcommunityack = QString("<br/><br/>The developers of wfview wish to thank the many contributions from the wfview community at-large, including ideas, bug reports, and fixes.");
QString kappanhangack = QString("<br/><br/>Special thanks to Norbert Varga, and the <a href=\"https://github.com/nonoo/kappanhang\">nonoo/kappanhang team</a> for their initial work on the OEM protocol.");
QString sxcreditcopyright = QString("Speex copyright notice:\
Copyright (C) 2003 Jean-Marc Valin\n\
Redistribution and use in source and binary forms, with or without\n\
modification, are permitted provided that the following conditions\n\
are met:\n\
- Redistributions of source code must retain the above copyright\n\
notice, this list of conditions and the following disclaimer.\n\
- Redistributions in binary form must reproduce the above copyright\n\
notice, this list of conditions and the following disclaimer in the\n\
documentation and/or other materials provided with the distribution.\n\
- Neither the name of the Xiph.org Foundation nor the names of its\n\
contributors may be used to endorse or promote products derived from\n\
this software without specific prior written permission.\n\
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR\n\
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n\
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n\
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n\
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n\
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n\
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
// String it all together:
QString aboutText = head + copyright + "\n" + nacode + "\n" + doctest + wfviewcommunityack;
aboutText.append(website + "\n"+ docs + support + contact +"\n");
aboutText.append("\n" + ssCredit + "\n" + rsCredit + "\n");
#if defined(RTAUDIO)
aboutText.append(rtaudiocredit);
#endif
#if defined(PORTAUDIO)
aboutText.append(portaudiocredit);
#endif
aboutText.append(kappanhangack + qcpcredit + qtcredit);
aboutText.append("<br/><br/>");
aboutText.append("<pre>" + sxcreditcopyright + "</pre>");
aboutText.append("<br/><br/>");
aboutText.append(end);
ui->midTextBox->setText(aboutText);
ui->bottomText->setText(buildInfo);
ui->midTextBox->setFocus();
}
aboutbox::~aboutbox()
{
delete ui;
}
void aboutbox::on_logoBtn_clicked()
{
QDesktopServices::openUrl(QUrl("https://www.wfview.org/"));
}

26
aboutbox.h 100644
Wyświetl plik

@ -0,0 +1,26 @@
#ifndef ABOUTBOX_H
#define ABOUTBOX_H
#include <QWidget>
#include <QDesktopServices>
namespace Ui {
class aboutbox;
}
class aboutbox : public QWidget
{
Q_OBJECT
public:
explicit aboutbox(QWidget *parent = 0);
~aboutbox();
private slots:
void on_logoBtn_clicked();
private:
Ui::aboutbox *ui;
};
#endif // ABOUTBOX_H

74
aboutbox.ui 100644
Wyświetl plik

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>aboutbox</class>
<widget class="QWidget" name="aboutbox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>567</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="logoBtn">
<property name="minimumSize">
<size>
<width>0</width>
<height>128</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="topText">
<property name="text">
<string>wfview version</string>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="midTextBox">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Detailed text here&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="bottomText">
<property name="text">
<string>Build String</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

Wyświetl plik

@ -288,7 +288,9 @@ void audioHandler::start()
void audioHandler::setVolume(unsigned char volume)
{
this->volume = (qreal)volume/255.0;
//this->volume = (qreal)volume/255.0;
this->volume = audiopot[volume];
qInfo(logAudio()) << (setup.isinput ? "Input" : "Output") << "setVolume: " << volume << "(" << this->volume << ")";
}

Wyświetl plik

@ -33,7 +33,7 @@ typedef signed short MY_TYPE;
#include <QMap>
#include "resampler/speex_resampler.h"
#include "ring/ring.h"
#include "audiotaper.h"
#include <QDebug>

273
audiotaper.h 100644
Wyświetl plik

@ -0,0 +1,273 @@
#ifndef AUDIOTAPER_H
#define AUDIOTAPER_H
#include <QtMath>
const qreal audiopot[256] =
{
0.00000,
0.00101,
0.00202,
0.00305,
0.00409,
0.00513,
0.00619,
0.00725,
0.00832,
0.00941,
0.01050,
0.01160,
0.01272,
0.01384,
0.01497,
0.01612,
0.01727,
0.01843,
0.01961,
0.02080,
0.02199,
0.02320,
0.02442,
0.02565,
0.02689,
0.02814,
0.02940,
0.03068,
0.03196,
0.03326,
0.03457,
0.03589,
0.03723,
0.03857,
0.03993,
0.04130,
0.04268,
0.04408,
0.04548,
0.04690,
0.04834,
0.04978,
0.05124,
0.05272,
0.05420,
0.05570,
0.05721,
0.05874,
0.06028,
0.06184,
0.06341,
0.06499,
0.06659,
0.06820,
0.06982,
0.07146,
0.07312,
0.07479,
0.07648,
0.07818,
0.07990,
0.08163,
0.08338,
0.08514,
0.08692,
0.08872,
0.09053,
0.09236,
0.09421,
0.09607,
0.09795,
0.09984,
0.10176,
0.10369,
0.10564,
0.10760,
0.10959,
0.11159,
0.11361,
0.11565,
0.11770,
0.11978,
0.12187,
0.12399,
0.12612,
0.12827,
0.13044,
0.13263,
0.13484,
0.13707,
0.13933,
0.14160,
0.14389,
0.14620,
0.14854,
0.15089,
0.15327,
0.15567,
0.15809,
0.16053,
0.16299,
0.16548,
0.16799,
0.17052,
0.17307,
0.17565,
0.17825,
0.18088,
0.18353,
0.18620,
0.18889,
0.19162,
0.19436,
0.19713,
0.19993,
0.20275,
0.20560,
0.20847,
0.21137,
0.21429,
0.21725,
0.22022,
0.22323,
0.22626,
0.22932,
0.23241,
0.23553,
0.23867,
0.24184,
0.24504,
0.24828,
0.25153,
0.25482,
0.25814,
0.26149,
0.26487,
0.26828,
0.27172,
0.27520,
0.27870,
0.28224,
0.28580,
0.28941,
0.29304,
0.29670,
0.30040,
0.30414,
0.30790,
0.31170,
0.31554,
0.31941,
0.32331,
0.32725,
0.33123,
0.33524,
0.33929,
0.34338,
0.34750,
0.35166,
0.35586,
0.36009,
0.36437,
0.36868,
0.37303,
0.37742,
0.38185,
0.38633,
0.39084,
0.39539,
0.39999,
0.40462,
0.40930,
0.41402,
0.41878,
0.42359,
0.42844,
0.43333,
0.43827,
0.44326,
0.44828,
0.45336,
0.45848,
0.46364,
0.46886,
0.47412,
0.47943,
0.48478,
0.49019,
0.49564,
0.50115,
0.50670,
0.51230,
0.51796,
0.52366,
0.52942,
0.53523,
0.54110,
0.54701,
0.55298,
0.55900,
0.56508,
0.57122,
0.57741,
0.58365,
0.58995,
0.59631,
0.60273,
0.60920,
0.61574,
0.62233,
0.62898,
0.63570,
0.64247,
0.64931,
0.65620,
0.66316,
0.67019,
0.67727,
0.68442,
0.69164,
0.69892,
0.70627,
0.71368,
0.72116,
0.72871,
0.73633,
0.74402,
0.75178,
0.75960,
0.76750,
0.77547,
0.78351,
0.79163,
0.79981,
0.80808,
0.81641,
0.82483,
0.83332,
0.84188,
0.85053,
0.85925,
0.86805,
0.87693,
0.88590,
0.89494,
0.90407,
0.91327,
0.92257,
0.93194,
0.94140,
0.95095,
0.96058,
0.97030,
0.98011,
0.99001,
1.00000
};
#endif // AUDIOTAPER_H

Wyświetl plik

@ -6,6 +6,8 @@ transceiverAdjustments::transceiverAdjustments(QWidget *parent) :
ui(new Ui::transceiverAdjustments)
{
ui->setupUi(this);
// request level updates
}
transceiverAdjustments::~transceiverAdjustments()

Wyświetl plik

@ -28,6 +28,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
sat = new satelliteSetup();
trxadj = new transceiverAdjustments();
srv = new udpServerSetup();
abtBox = new aboutbox();
connect(this, SIGNAL(sendServerConfig(SERVERCONFIG)), srv, SLOT(receiveServerConfig(SERVERCONFIG)));
connect(srv, SIGNAL(serverConfig(SERVERCONFIG, bool)), this, SLOT(serverConfigRequested(SERVERCONFIG, bool)));
@ -3754,58 +3755,9 @@ void wfmain::on_bandGenbtn_clicked()
void wfmain::on_aboutBtn_clicked()
{
QMessageBox msgBox(this);
msgBox.setWindowTitle("Abou wfview");
msgBox.setTextFormat(Qt::RichText);
msgBox.setWindowIcon(QIcon(":resources/wfview.png"));
// TODO: change style of link color based on current CSS sheet.
abtBox->show();
QString head = QString("<html><head></head><body>");
QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved.");
QString nacode = QString("<br/><br/>Networking and audio code 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 ssCredit = QString("<br/><br/>Stylesheet <a href=\"https://github.com/ColinDuquesnoy/QDarkStyleSheet/tree/master/qdarkstyle\" style=\"color: cyan;\">qdarkstyle</a> used under MIT license, stored in /usr/share/wfview/stylesheets/.");
QString rsCredit = QString("<br/><br/><a href=\"https://www.speex.org/\" style=\"color: cyan;\">Speex</a> Resample library Copyright 2003-2008 Jean-Marc Valin");
QString website = QString("<br/><br/>Please visit <a href=\"https://wfview.org/\" style=\"color: cyan;\">https://wfview.org/</a> for the latest information.");
QString docs = QString("<br/><br/>Be sure to check the <a href=\"https://wfview.org/wfview-user-manual/\" style=\"color: cyan;\">User Manual</a> and <a href=\"https://forum.wfview.org/\" style=\"color: cyan;\">the Forum</a> if you have any questions.");
QString gitcodelink = QString("<a href=\"https://gitlab.com/eliggett/wfview/-/tree/%1\" style=\"color: cyan;\">").arg(GITSHORT);
QString contact = QString("<br/>email the author: kilocharlie8@gmail.com or W6EL on the air!");
QString buildInfo = QString("<br/><br/>Build " + gitcodelink + QString(GITSHORT) + "</a> on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
QString end = QString("</body></html>");
QString aboutText = head + copyright + "\n" + nacode + "\n" + doctest + "\n" + ssCredit + "\n" + rsCredit + "\n";
aboutText.append(website + "\n"+ docs + contact +"\n" + buildInfo + end);
msgBox.setText(aboutText);
msgBox.exec();
volatile QString sxcreditcopyright = QString("Speex copyright notice:\
Copyright (C) 2003 Jean-Marc Valin\n\
Redistribution and use in source and binary forms, with or without\
modification, are permitted provided that the following conditions\
are met:\n\
- Redistributions of source code must retain the above copyright\
notice, this list of conditions and the following disclaimer.\n\
- Redistributions in binary form must reproduce the above copyright\
notice, this list of conditions and the following disclaimer in the\
documentation and/or other materials provided with the distribution.\n\
- Neither the name of the Xiph.org Foundation nor the names of its\
contributors may be used to endorse or promote products derived from\
this software without specific prior written permission.\n\
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR\
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
}

Wyświetl plik

@ -26,6 +26,7 @@
#include "udpserver.h"
#include "qledlabel.h"
#include "rigctld.h"
#include "aboutbox.h"
#include <qcustomplot.h>
#include <qserialportinfo.h>
@ -744,6 +745,7 @@ private:
satelliteSetup *sat;
transceiverAdjustments *trxadj;
udpServerSetup *srv;
aboutbox *abtBox;
udpServer* udp = Q_NULLPTR;

Wyświetl plik

@ -129,7 +129,8 @@ SOURCES += main.cpp\
repeatersetup.cpp \
rigctld.cpp \
ring/ring.cpp \
transceiveradjustments.cpp
transceiveradjustments.cpp \
aboutbox.cpp
HEADERS += wfmain.h \
commhandler.h \
@ -155,7 +156,9 @@ HEADERS += wfmain.h \
rigctld.h \
ulaw.h \
ring/ring.h \
transceiveradjustments.h
transceiveradjustments.h \
audiotaper.h \
aboutbox.h
FORMS += wfmain.ui \
@ -163,7 +166,8 @@ FORMS += wfmain.ui \
satellitesetup.ui \
udpserversetup.ui \
repeatersetup.ui \
transceiveradjustments.ui
transceiveradjustments.ui \
aboutbox.ui