kopia lustrzana https://gitlab.com/eliggett/wfview
Various fixes
Log External API versions at start Log connection failures and try reconnectcreator-widgets
rodzic
03a1c5dfe9
commit
ce71260bc5
|
@ -48,7 +48,7 @@ bool audioConverter::init(QAudioFormat inFormat, codecType inCodec, QAudioFormat
|
|||
//opus_encoder_ctl(opusEncoder, OPUS_SET_DTX(1));
|
||||
//opus_encoder_ctl(opusEncoder, OPUS_SET_PACKET_LOSS_PERC(5));
|
||||
opus_encoder_ctl(opusEncoder, OPUS_SET_COMPLEXITY(opusComplexity)); // Reduce complexity to maybe lower CPU?
|
||||
qInfo(logAudioConverter()) << "Creating opus encoder: " << opus_strerror(opus_err);
|
||||
qInfo(logAudioConverter()) << "Creating opus encoder: " << opus_strerror(opus_err);
|
||||
}
|
||||
|
||||
if (inFormat.sampleRate() != outFormat.sampleRate())
|
||||
|
|
|
@ -84,23 +84,6 @@ void usbController::init(QMutex* mut,usbDevMap* devs ,QVector<BUTTON>* buts,QVec
|
|||
// We need to make sure that all buttons/knobs have a command assigned, this is a fairly expensive operation
|
||||
// Perform a deep copy of the command to ensure that each controller is using a unique copy of the command.
|
||||
|
||||
#ifdef HID_API_VERSION_MAJOR
|
||||
if (HID_API_VERSION == HID_API_MAKE_VERSION(hid_version()->major, hid_version()->minor, hid_version()->patch)) {
|
||||
qInfo(logUsbControl) << QString("Compile-time version matches runtime version of hidapi: %0.%1.%2")
|
||||
.arg(hid_version()->major)
|
||||
.arg(hid_version()->minor)
|
||||
.arg(hid_version()->patch);
|
||||
}
|
||||
else {
|
||||
qInfo(logUsbControl) << QString("Compile-time and runtime versions of hidapi do not match (%0.%1.%2 vs %0.%1.%2)")
|
||||
.arg(HID_API_VERSION_MAJOR)
|
||||
.arg(HID_API_VERSION_MINOR)
|
||||
.arg(HID_API_VERSION_PATCH)
|
||||
.arg(hid_version()->major)
|
||||
.arg(hid_version()->minor)
|
||||
.arg(hid_version()->patch);
|
||||
}
|
||||
#endif
|
||||
hidStatus = hid_init();
|
||||
if (hidStatus) {
|
||||
qInfo(logUsbControl()) << "Failed to intialize HID Devices";
|
||||
|
|
74
wfmain.cpp
74
wfmain.cpp
|
@ -31,12 +31,6 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
setWindowIcon(QIcon( QString(":resources/wfview.png")));
|
||||
this->debugMode = debugMode;
|
||||
debugModeLogging = debugMode;
|
||||
version = QString("wfview version: %1 (Git:%2 on %3 at %4 by %5@%6). Operating System: %7 (%8). Build Qt Version %9. Current Qt Version: %10")
|
||||
.arg(QString(WFVIEW_VERSION))
|
||||
.arg(GITSHORT).arg(__DATE__).arg(__TIME__).arg(UNAME).arg(HOST)
|
||||
.arg(QSysInfo::prettyProductName()).arg(QSysInfo::buildCpuArchitecture())
|
||||
.arg(QT_VERSION_STR).arg(qVersion());
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowTitle(QString("wfview"));
|
||||
|
||||
|
@ -46,7 +40,50 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
logWindow = new loggingWindow(logFile);
|
||||
initLogging();
|
||||
logWindow->setInitialDebugState(debugMode);
|
||||
qInfo(logSystem()) << version;
|
||||
qInfo(logSystem()).noquote() << QString("wfview version: %1 (Git:%2 on %3 at %4 by %5@%6)")
|
||||
.arg(QString(WFVIEW_VERSION),GITSHORT,__DATE__,__TIME__,UNAME,HOST);
|
||||
|
||||
qInfo(logSystem()).noquote() << QString("Operating System: %0 (%1)").arg(QSysInfo::prettyProductName(),QSysInfo::buildCpuArchitecture());
|
||||
qInfo(logSystem()).noquote() << "Looking for External Dependencies:";
|
||||
qInfo(logSystem()).noquote() << QString("QT Runtime Version: %0").arg(qVersion());
|
||||
if (strncmp(QT_VERSION_STR, qVersion(),sizeof(QT_VERSION_STR)))
|
||||
{
|
||||
qWarning(logSystem()).noquote() << QString("QT Build Version Mismatch: %0").arg(QT_VERSION_STR);
|
||||
}
|
||||
|
||||
qInfo(logSystem()).noquote() << QString("OPUS Version: %0").arg(opus_get_version_string());
|
||||
|
||||
#ifdef HID_API_VERSION_MAJOR
|
||||
qInfo(logSystem()).noquote() << QString("HIDAPI Version: %0.%1.%2")
|
||||
.arg(HID_API_VERSION_MAJOR)
|
||||
.arg(HID_API_VERSION_MINOR)
|
||||
.arg(HID_API_VERSION_PATCH);
|
||||
|
||||
if (HID_API_VERSION != HID_API_MAKE_VERSION(hid_version()->major, hid_version()->minor, hid_version()->patch)) {
|
||||
qWarning(logSystem()).noquote() << QString("HIDAPI Version mismatch: %0.%1.%2")
|
||||
.arg(hid_version()->major)
|
||||
.arg(hid_version()->minor)
|
||||
.arg(hid_version()->patch);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_WORLD_VERSION
|
||||
qInfo(logSystem()).noquote() << QString("EIGEN Version: %0.%1.%2").arg(EIGEN_WORLD_VERSION).arg(EIGEN_MAJOR_VERSION).arg(EIGEN_MINOR_VERSION);
|
||||
#endif
|
||||
|
||||
#ifdef QCUSTOMPLOT_VERSION_STR
|
||||
qInfo(logSystem()).noquote() << QString("QCUSTOMPLOT Version: %0").arg(QCUSTOMPLOT_VERSION_STR);
|
||||
#endif
|
||||
|
||||
#ifdef RTAUDIO_VERSION
|
||||
qInfo(logSystem()).noquote() << QString("RTAUDIO Version: %0").arg(RTAUDIO_VERSION);
|
||||
if (RTAUDIO_VERSION != RtAudio::getVersion())
|
||||
{
|
||||
qWarning(logSystem()).noquote() << QString("RTAUDIO Version Mismatch: %0").arg(RtAudio::getVersion().c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
qInfo(logSystem()).noquote() << QString("PORTAUDIO Version: %0").arg(Pa_GetVersionText());
|
||||
|
||||
cal = new calibrationWindow();
|
||||
rpt = new repeaterSetup();
|
||||
|
@ -59,6 +96,7 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
finputbtns = new frequencyinputwidget();
|
||||
setupui = new settingswidget();
|
||||
|
||||
|
||||
qRegisterMetaType<udpPreferences>(); // Needs to be registered early.
|
||||
qRegisterMetaType<rigCapabilities>();
|
||||
qRegisterMetaType<duplexMode_t>();
|
||||
|
@ -172,6 +210,11 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
}
|
||||
}
|
||||
|
||||
// Setup the connectiontimer as we will need it soon!
|
||||
ConnectionTimer.setSingleShot(true);
|
||||
connect(&ConnectionTimer,SIGNAL(timeout()), this,SLOT(connectionTimeout()));
|
||||
|
||||
|
||||
setupKeyShortcuts();
|
||||
|
||||
setupMainUI();
|
||||
|
@ -188,7 +231,6 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
|
||||
loadSettings(); // Look for saved preferences
|
||||
|
||||
|
||||
//setAudioDevicesUI(); // no need to call this as it will be called by the updated() signal
|
||||
|
||||
setTuningSteps(); // TODO: Combine into preferences
|
||||
|
@ -382,6 +424,9 @@ void wfmain::openRig()
|
|||
|
||||
makeRig();
|
||||
|
||||
// 10 second connection timeout.
|
||||
ConnectionTimer.start(10000);
|
||||
|
||||
if (prefs.enableLAN)
|
||||
{
|
||||
usingLAN = true;
|
||||
|
@ -660,7 +705,7 @@ void wfmain::findSerialPort()
|
|||
|
||||
void wfmain::receiveCommReady()
|
||||
{
|
||||
qInfo(logSystem()) << "Received CommReady!! ";
|
||||
//qInfo(logSystem()) << "Received CommReady!! ";
|
||||
if(!usingLAN)
|
||||
{
|
||||
// usingLAN gets set when we emit the sendCommSetup signal.
|
||||
|
@ -3747,9 +3792,13 @@ void wfmain::setDefaultColors(int presetNumber)
|
|||
|
||||
void wfmain::receiveRigID(rigCapabilities rigCaps)
|
||||
{
|
||||
// We have heard from the rig, so if the connection is pending, stop the timer immediately
|
||||
ConnectionTimer.stop();
|
||||
|
||||
// Note: We intentionally request rigID several times
|
||||
// because without rigID, we can't do anything with the waterfall.
|
||||
bandbtns->acceptRigCaps(rigCaps);
|
||||
|
||||
if(haveRigCaps)
|
||||
{
|
||||
// Note: This line makes it difficult to accept a different radio connecting.
|
||||
|
@ -5360,6 +5409,13 @@ void wfmain::connectionHandler(bool connect)
|
|||
|
||||
}
|
||||
|
||||
void wfmain::connectionTimeout()
|
||||
{
|
||||
qWarning(logSystem()) << "No response received to connection request";
|
||||
connectionHandler(false);
|
||||
connectionHandler(true);
|
||||
}
|
||||
|
||||
void wfmain::on_cwButton_clicked()
|
||||
{
|
||||
if(cw->isMinimized())
|
||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -497,6 +497,7 @@ private slots:
|
|||
void on_dualWatchBtn_toggled(bool en);
|
||||
|
||||
void receiveElapsed(bool sub, qint64 us);
|
||||
void connectionTimeout();
|
||||
|
||||
private:
|
||||
Ui::wfmain *ui; // Main UI
|
||||
|
@ -514,6 +515,7 @@ private:
|
|||
QTimer logCheckingTimer;
|
||||
int logCheckingOldPosition = 0;
|
||||
QTimer ATUCheckTimer;
|
||||
QTimer ConnectionTimer;
|
||||
|
||||
QCustomPlot *plot; // line plot
|
||||
QCustomPlot *wf; // waterfall image
|
||||
|
|
|
@ -198,25 +198,25 @@ CONFIG(debug, release|debug) {
|
|||
win32:LIBS += -lqcustomplot2
|
||||
win32 {
|
||||
contains(QMAKE_TARGET.arch, x86_64) {
|
||||
LIBS += -L../opus/win32/VS2015/x64/ReleaseDLL/
|
||||
LIBS += -L../opus/win32/x64/ReleaseDLL/src
|
||||
LIBS += -L../qcustomplot/x64
|
||||
LIBS += -L../portaudio/msvc/X64/Release/ -lportaudio_x64
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\qcustomplot\x64\qcustomplot2.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\portaudio\msvc\x64\Release\portaudio_x64.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\hidapi\windows\X64\Release\hidapi.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\VS2015\x64\ReleaseDLL\opus.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\x64\ReleaseDLL\src\opus-0.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s/y ..\wfview\rigs\*.* wfview-release\rigs\*.* $$escape_expand(\\n\\t))
|
||||
contains(DEFINES,USB_CONTROLLER){
|
||||
LIBS += -L../hidapi/windows/x64/release -lhidapi
|
||||
}
|
||||
} else {
|
||||
LIBS += -L../opus/win32/VS2015/win32/ReleaseDLL/
|
||||
LIBS += -L../opus/win32/win32/ReleaseDLL/src
|
||||
LIBS += -L../qcustomplot/win32
|
||||
LIBS += -L../portaudio/msvc/Win32/Release/ -lportaudio_x86
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\qcustomplot\win32\qcustomplot2.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\portaudio\msvc\win32\Release\portaudio_x86.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\hidapi\windows\Release\hidapi.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\VS2015\win32\ReleaseDLL\opus.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c copy /y ..\opus\win32\win32\ReleaseDLL\opus-0.dll wfview-release $$escape_expand(\\n\\t))
|
||||
QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s/y ..\wfview\rigs\*.* wfview-release\rigs\*.* $$escape_expand(\\n\\t))
|
||||
contains(DEFINES,USB_CONTROLLER){
|
||||
win32:LIBS += -L../hidapi/windows/release -lhidapi
|
||||
|
|
Ładowanie…
Reference in New Issue