Starting to implement uploading to PSKReporter.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3042 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-03-10 02:45:12 +00:00
parent 3f8c6977b4
commit 21d8c80360
7 changed files with 41 additions and 64 deletions

View File

@ -99,12 +99,11 @@ void DevSetup::initDlg()
ui.idIntSpinBox->setValue(m_idInt); ui.idIntSpinBox->setValue(m_idInt);
ui.pttComboBox->setCurrentIndex(m_pttPort); ui.pttComboBox->setCurrentIndex(m_pttPort);
ui.saveDirEntry->setText(m_saveDir); ui.saveDirEntry->setText(m_saveDir);
ui.dxccEntry->setText(m_dxccPfx);
ui.comboBoxSndIn->setCurrentIndex(m_nDevIn); ui.comboBoxSndIn->setCurrentIndex(m_nDevIn);
ui.comboBoxSndOut->setCurrentIndex(m_nDevOut); ui.comboBoxSndOut->setCurrentIndex(m_nDevOut);
ui.cbPSKReporter->setChecked(m_pskReporter);
m_paInDevice=m_inDevList[m_nDevIn]; m_paInDevice=m_inDevList[m_nDevIn];
m_paOutDevice=m_outDevList[m_nDevOut]; m_paOutDevice=m_outDevList[m_nDevOut];
} }
//------------------------------------------------------- accept() //------------------------------------------------------- accept()
@ -125,7 +124,6 @@ void DevSetup::accept()
m_idInt=ui.idIntSpinBox->value(); m_idInt=ui.idIntSpinBox->value();
m_pttPort=ui.pttComboBox->currentIndex(); m_pttPort=ui.pttComboBox->currentIndex();
m_saveDir=ui.saveDirEntry->text(); m_saveDir=ui.saveDirEntry->text();
m_dxccPfx=ui.dxccEntry->text();
m_nDevIn=ui.comboBoxSndIn->currentIndex(); m_nDevIn=ui.comboBoxSndIn->currentIndex();
m_paInDevice=m_inDevList[m_nDevIn]; m_paInDevice=m_inDevList[m_nDevIn];
m_nDevOut=ui.comboBoxSndOut->currentIndex(); 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(); t=t.mid(0,4).toUpper()+t.mid(4,2).toLower();
ui.myGridEntry->setText(t); ui.myGridEntry->setText(t);
} }
void DevSetup::on_cbPSKReporter_clicked(bool b)
{
m_pskReporter=b;
}

View File

@ -23,20 +23,20 @@ public:
bool m_restartSoundIn; bool m_restartSoundIn;
bool m_restartSoundOut; bool m_restartSoundOut;
bool m_pskReporter;
QString m_myCall; QString m_myCall;
QString m_myGrid; QString m_myGrid;
QString m_saveDir; QString m_saveDir;
QString m_azelDir; QString m_azelDir;
QString m_dxccPfx;
public slots: public slots:
void accept(); void accept();
private slots: private slots:
void on_myCallEntry_editingFinished(); void on_myCallEntry_editingFinished();
void on_myGridEntry_editingFinished(); void on_myGridEntry_editingFinished();
void on_cbPSKReporter_clicked(bool checked);
private: private:
Ui::DialogSndCard ui; Ui::DialogSndCard ui;

View File

@ -224,66 +224,14 @@
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <layout class="QVBoxLayout" name="verticalLayout_4"/>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>DXCC:</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<widget class="QLineEdit" name="dxccEntry"> <widget class="QCheckBox" name="cbPSKReporter">
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>PJ9</string> <string>ENable PSK Reporter</string>
</property> </property>
</widget> </widget>
</item> </item>

BIN
libpskreporter.a Normal file

Binary file not shown.

View File

@ -218,6 +218,28 @@ MainWindow::MainWindow(QWidget *parent) :
if(ui->actionCuteSDR->isChecked()) on_actionCuteSDR_triggered(); if(ui->actionCuteSDR->isChecked()) on_actionCuteSDR_triggered();
if(ui->actionAFMHot->isChecked()) on_actionAFMHot_triggered(); if(ui->actionAFMHot->isChecked()) on_actionAFMHot_triggered();
if(ui->actionBlue->isChecked()) on_actionBlue_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 } // End of MainWindow constructor
//--------------------------------------------------- MainWindow destructor //--------------------------------------------------- MainWindow destructor
@ -263,7 +285,6 @@ void MainWindow::writeSettings()
settings.setValue("IDint",m_idInt); settings.setValue("IDint",m_idInt);
settings.setValue("PTTport",m_pttPort); settings.setValue("PTTport",m_pttPort);
settings.setValue("SaveDir",m_saveDir); settings.setValue("SaveDir",m_saveDir);
settings.setValue("DXCCpfx",m_dxccPfx);
settings.setValue("SoundInIndex",m_nDevIn); settings.setValue("SoundInIndex",m_nDevIn);
settings.setValue("paInDevice",m_paInDevice); settings.setValue("paInDevice",m_paInDevice);
settings.setValue("SoundOutIndex",m_nDevOut); settings.setValue("SoundOutIndex",m_nDevOut);
@ -285,6 +306,7 @@ void MainWindow::writeSettings()
settings.setValue("TxFreq",m_txFreq); settings.setValue("TxFreq",m_txFreq);
settings.setValue("Tol",m_tol); settings.setValue("Tol",m_tol);
settings.setValue("InGain",m_inGain); settings.setValue("InGain",m_inGain);
settings.setValue("PSKReporter",m_pskReporter);
settings.endGroup(); settings.endGroup();
} }
@ -310,7 +332,6 @@ void MainWindow::readSettings()
m_idInt=settings.value("IDint",0).toInt(); m_idInt=settings.value("IDint",0).toInt();
m_pttPort=settings.value("PTTport",0).toInt(); m_pttPort=settings.value("PTTport",0).toInt();
m_saveDir=settings.value("SaveDir",m_appDir + "/save").toString(); m_saveDir=settings.value("SaveDir",m_appDir + "/save").toString();
m_dxccPfx=settings.value("DXCCpfx","").toString();
m_nDevIn = settings.value("SoundInIndex", 0).toInt(); m_nDevIn = settings.value("SoundInIndex", 0).toInt();
m_paInDevice = settings.value("paInDevice",0).toInt(); m_paInDevice = settings.value("paInDevice",0).toInt();
m_nDevOut = settings.value("SoundOutIndex", 0).toInt(); m_nDevOut = settings.value("SoundOutIndex", 0).toInt();
@ -348,6 +369,7 @@ void MainWindow::readSettings()
ui->actionF4_sets_Tx6->setChecked(m_kb8rq); ui->actionF4_sets_Tx6->setChecked(m_kb8rq);
m_monitorStartOFF=settings.value("MonitorOFF",false).toBool(); m_monitorStartOFF=settings.value("MonitorOFF",false).toBool();
ui->actionMonitor_OFF_at_startup->setChecked(m_monitorStartOFF); ui->actionMonitor_OFF_at_startup->setChecked(m_monitorStartOFF);
m_pskReporter=settings.value("PSKReporter",false).toBool();
settings.endGroup(); settings.endGroup();
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() && 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_idInt=m_idInt;
dlg.m_pttPort=m_pttPort; dlg.m_pttPort=m_pttPort;
dlg.m_saveDir=m_saveDir; dlg.m_saveDir=m_saveDir;
dlg.m_dxccPfx=m_dxccPfx;
dlg.m_nDevIn=m_nDevIn; dlg.m_nDevIn=m_nDevIn;
dlg.m_nDevOut=m_nDevOut; dlg.m_nDevOut=m_nDevOut;
dlg.m_pskReporter=m_pskReporter;
dlg.initDlg(); dlg.initDlg();
if(dlg.exec() == QDialog::Accepted) { if(dlg.exec() == QDialog::Accepted) {
@ -445,11 +467,11 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
m_idInt=dlg.m_idInt; m_idInt=dlg.m_idInt;
m_pttPort=dlg.m_pttPort; m_pttPort=dlg.m_pttPort;
m_saveDir=dlg.m_saveDir; m_saveDir=dlg.m_saveDir;
m_dxccPfx=dlg.m_dxccPfx;
m_nDevIn=dlg.m_nDevIn; m_nDevIn=dlg.m_nDevIn;
m_paInDevice=dlg.m_paInDevice; m_paInDevice=dlg.m_paInDevice;
m_nDevOut=dlg.m_nDevOut; m_nDevOut=dlg.m_nDevOut;
m_paOutDevice=dlg.m_paOutDevice; m_paOutDevice=dlg.m_paOutDevice;
m_pskReporter=dlg.m_pskReporter;
if(dlg.m_restartSoundIn) { if(dlg.m_restartSoundIn) {
soundInThread.quit(); soundInThread.quit();

View File

@ -6,6 +6,7 @@
#include "soundin.h" #include "soundin.h"
#include "soundout.h" #include "soundout.h"
#include "commons.h" #include "commons.h"
#include "PSKReporter.h"
//--------------------------------------------------------------- MainWindow //--------------------------------------------------------------- MainWindow
namespace Ui { namespace Ui {
@ -159,6 +160,7 @@ private:
bool m_bsynced; bool m_bsynced;
bool m_bdecoded; bool m_bdecoded;
bool m_monitorStartOFF; bool m_monitorStartOFF;
bool m_pskReporter;
char m_decoded[80]; char m_decoded[80];
@ -223,6 +225,7 @@ extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
int minChan[], int maxChan[], int minChan[], int maxChan[],
int minSpeed[], int maxSpeed[]); int minSpeed[], int maxSpeed[]);
extern int ptt(int nport, int itx, int* iptt); extern int ptt(int nport, int itx, int* iptt);
//extern int ReporterInitialize(char* hostname, char* port);
extern "C" { extern "C" {

View File

@ -63,6 +63,7 @@ win32 {
INCLUDEPATH += c:/qwt-6.0.1/include INCLUDEPATH += c:/qwt-6.0.1/include
LIBS += ../wsjtx/lib/libjt9.a LIBS += ../wsjtx/lib/libjt9.a
LIBS += ../wsjtx/libfftw3f_win.a LIBS += ../wsjtx/libfftw3f_win.a
LIBS += ../wsjtx/libpskreporter.a
LIBS += ../QtSupport/palir-02.dll LIBS += ../QtSupport/palir-02.dll
LIBS += libwsock32 LIBS += libwsock32
LIBS += C:/MinGW/lib/libf95.a LIBS += C:/MinGW/lib/libf95.a