diff --git a/devsetup.cpp b/devsetup.cpp
index 8bb255abb..9be04d3e3 100644
--- a/devsetup.cpp
+++ b/devsetup.cpp
@@ -99,12 +99,11 @@ void DevSetup::initDlg()
ui.idIntSpinBox->setValue(m_idInt);
ui.pttComboBox->setCurrentIndex(m_pttPort);
ui.saveDirEntry->setText(m_saveDir);
- ui.dxccEntry->setText(m_dxccPfx);
ui.comboBoxSndIn->setCurrentIndex(m_nDevIn);
ui.comboBoxSndOut->setCurrentIndex(m_nDevOut);
+ ui.cbPSKReporter->setChecked(m_pskReporter);
m_paInDevice=m_inDevList[m_nDevIn];
m_paOutDevice=m_outDevList[m_nDevOut];
-
}
//------------------------------------------------------- accept()
@@ -125,7 +124,6 @@ void DevSetup::accept()
m_idInt=ui.idIntSpinBox->value();
m_pttPort=ui.pttComboBox->currentIndex();
m_saveDir=ui.saveDirEntry->text();
- m_dxccPfx=ui.dxccEntry->text();
m_nDevIn=ui.comboBoxSndIn->currentIndex();
m_paInDevice=m_inDevList[m_nDevIn];
m_nDevOut=ui.comboBoxSndOut->currentIndex();
@@ -146,3 +144,8 @@ void DevSetup::on_myGridEntry_editingFinished()
t=t.mid(0,4).toUpper()+t.mid(4,2).toLower();
ui.myGridEntry->setText(t);
}
+
+void DevSetup::on_cbPSKReporter_clicked(bool b)
+{
+ m_pskReporter=b;
+}
diff --git a/devsetup.h b/devsetup.h
index 6a231610c..e6fd50fb9 100644
--- a/devsetup.h
+++ b/devsetup.h
@@ -23,20 +23,20 @@ public:
bool m_restartSoundIn;
bool m_restartSoundOut;
+ bool m_pskReporter;
QString m_myCall;
QString m_myGrid;
QString m_saveDir;
QString m_azelDir;
- QString m_dxccPfx;
public slots:
void accept();
private slots:
void on_myCallEntry_editingFinished();
-
void on_myGridEntry_editingFinished();
+ void on_cbPSKReporter_clicked(bool checked);
private:
Ui::DialogSndCard ui;
diff --git a/devsetup.ui b/devsetup.ui
index 70fcffe57..e4161e273 100644
--- a/devsetup.ui
+++ b/devsetup.ui
@@ -224,66 +224,14 @@
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 20
-
-
-
- DXCC:
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 20
-
-
-
-
-
+
-
-
-
-
-
- 60
- 16777215
-
-
+
- PJ9
+ ENable PSK Reporter
diff --git a/libpskreporter.a b/libpskreporter.a
new file mode 100644
index 000000000..f479d6aef
Binary files /dev/null and b/libpskreporter.a differ
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 8fd9a8331..b565859cf 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -218,6 +218,28 @@ MainWindow::MainWindow(QWidget *parent) :
if(ui->actionCuteSDR->isChecked()) on_actionCuteSDR_triggered();
if(ui->actionAFMHot->isChecked()) on_actionAFMHot_triggered();
if(ui->actionBlue->isChecked()) on_actionBlue_triggered();
+
+ /*
+ if(m_pskReporter) {
+ int rc=0;
+ rc=ReporterInitialize(NULL,NULL);
+ qDebug() << "A" << m_pskReporter << rc;
+
+ wchar_t buffer[256];
+ rc=ReporterGetInformation(buffer,256);
+ qDebug() << "B" << rc << QString::fromStdWString(buffer);
+
+ const wchar_t* tremote=L"call\0W8WNA\0gridsquare\0EM77\0freq\050280000\0mode\0JT9\0snr\0-17\0\0";
+ const wchar_t* tlocal=L"station_callsign\0K1JT\0my_gridsquare\0FN20qi\0programid\0WSJT-X\0\0";
+ int flags=REPORTER_SOURCE_AUTOMATIC | REPORTER_SOURCE_TEST;
+ rc=ReporterSeenCallsign(tremote,tlocal,flags);
+ rc=ReporterGetInformation(buffer,256);
+ qDebug() << "C" << rc << QString::fromStdWString(buffer);
+ rc=ReporterUninitialize();
+ qDebug() << "D" << rc;
+ }
+ */
+
} // End of MainWindow constructor
//--------------------------------------------------- MainWindow destructor
@@ -263,7 +285,6 @@ void MainWindow::writeSettings()
settings.setValue("IDint",m_idInt);
settings.setValue("PTTport",m_pttPort);
settings.setValue("SaveDir",m_saveDir);
- settings.setValue("DXCCpfx",m_dxccPfx);
settings.setValue("SoundInIndex",m_nDevIn);
settings.setValue("paInDevice",m_paInDevice);
settings.setValue("SoundOutIndex",m_nDevOut);
@@ -285,6 +306,7 @@ void MainWindow::writeSettings()
settings.setValue("TxFreq",m_txFreq);
settings.setValue("Tol",m_tol);
settings.setValue("InGain",m_inGain);
+ settings.setValue("PSKReporter",m_pskReporter);
settings.endGroup();
}
@@ -310,7 +332,6 @@ void MainWindow::readSettings()
m_idInt=settings.value("IDint",0).toInt();
m_pttPort=settings.value("PTTport",0).toInt();
m_saveDir=settings.value("SaveDir",m_appDir + "/save").toString();
- m_dxccPfx=settings.value("DXCCpfx","").toString();
m_nDevIn = settings.value("SoundInIndex", 0).toInt();
m_paInDevice = settings.value("paInDevice",0).toInt();
m_nDevOut = settings.value("SoundOutIndex", 0).toInt();
@@ -348,6 +369,7 @@ void MainWindow::readSettings()
ui->actionF4_sets_Tx6->setChecked(m_kb8rq);
m_monitorStartOFF=settings.value("MonitorOFF",false).toBool();
ui->actionMonitor_OFF_at_startup->setChecked(m_monitorStartOFF);
+ m_pskReporter=settings.value("PSKReporter",false).toBool();
settings.endGroup();
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
@@ -434,9 +456,9 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
dlg.m_idInt=m_idInt;
dlg.m_pttPort=m_pttPort;
dlg.m_saveDir=m_saveDir;
- dlg.m_dxccPfx=m_dxccPfx;
dlg.m_nDevIn=m_nDevIn;
dlg.m_nDevOut=m_nDevOut;
+ dlg.m_pskReporter=m_pskReporter;
dlg.initDlg();
if(dlg.exec() == QDialog::Accepted) {
@@ -445,11 +467,11 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
m_idInt=dlg.m_idInt;
m_pttPort=dlg.m_pttPort;
m_saveDir=dlg.m_saveDir;
- m_dxccPfx=dlg.m_dxccPfx;
m_nDevIn=dlg.m_nDevIn;
m_paInDevice=dlg.m_paInDevice;
m_nDevOut=dlg.m_nDevOut;
m_paOutDevice=dlg.m_paOutDevice;
+ m_pskReporter=dlg.m_pskReporter;
if(dlg.m_restartSoundIn) {
soundInThread.quit();
diff --git a/mainwindow.h b/mainwindow.h
index 98ab62b87..a91a9cf7f 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -6,6 +6,7 @@
#include "soundin.h"
#include "soundout.h"
#include "commons.h"
+#include "PSKReporter.h"
//--------------------------------------------------------------- MainWindow
namespace Ui {
@@ -159,6 +160,7 @@ private:
bool m_bsynced;
bool m_bdecoded;
bool m_monitorStartOFF;
+ bool m_pskReporter;
char m_decoded[80];
@@ -223,6 +225,7 @@ extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
int minChan[], int maxChan[],
int minSpeed[], int maxSpeed[]);
extern int ptt(int nport, int itx, int* iptt);
+//extern int ReporterInitialize(char* hostname, char* port);
extern "C" {
diff --git a/wsjtx.pro b/wsjtx.pro
index 99e713759..91dfb2625 100644
--- a/wsjtx.pro
+++ b/wsjtx.pro
@@ -63,6 +63,7 @@ win32 {
INCLUDEPATH += c:/qwt-6.0.1/include
LIBS += ../wsjtx/lib/libjt9.a
LIBS += ../wsjtx/libfftw3f_win.a
+LIBS += ../wsjtx/libpskreporter.a
LIBS += ../QtSupport/palir-02.dll
LIBS += libwsock32
LIBS += C:/MinGW/lib/libf95.a