First successful decode from within WSJT-X.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2664 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-15 19:18:45 +00:00
parent 884631a559
commit 5d38203e58
6 changed files with 64 additions and 6 deletions

6
jt9decode.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "jt9decode.h"
void JT9DecodeThread::run()
{
qDebug() << "Decode Thread started";
}

29
jt9decode.h Normal file
View File

@ -0,0 +1,29 @@
#ifndef JT9DECODE_H
#define JT9DECODE_H
#include <QtCore>
#include <QDebug>
class JT9DecodeThread : public QThread
{
Q_OBJECT
protected:
virtual void run();
public:
// Constructs (but does not start) a JT9DecodeThread
JT9DecodeThread()
: quitExecution(false) // Initialize some private members
, m_txOK(false)
{
}
public:
bool quitExecution; //If true, thread exits gracefully
// Private members
private:
bool m_txOK; //Enable Tx audio
};
#endif // JT9DECODE_H

View File

@ -23,7 +23,7 @@ subroutine sync9(ss,tstep,f0a,df3,ntol,nfqso,sync,fpk,ccfred)
if(ia.lt.1) ia=1
if(ib.gt.NSMAX) ib=NSMAX
endif
print*,ia,ib,df3*ia+1000,df3*ib+1000
print*,ia,ib,f0a,df3,ntol,nfqso,df3*ia+1000,df3*ib+1000
sbest=0.
lagmax=2.5/tstep + 0.9999

View File

@ -143,6 +143,10 @@ MainWindow::MainWindow(QWidget *parent) :
watcher2 = new QFutureWatcher<void>;
connect(watcher2, SIGNAL(finished()),this,SLOT(diskWriteFinished()));
future3 = new QFuture<void>;
watcher3 = new QFutureWatcher<void>;
connect(watcher3, SIGNAL(finished()),this,SLOT(decoderFinished()));
// Assign input device and start input thread
soundInThread.setInputDevice(m_paInDevice);
soundInThread.start(QThread::HighestPriority);
@ -732,7 +736,13 @@ void MainWindow::diskWriteFinished() //diskWriteFinished
{
qDebug() << "diskWriteFinished";
}
//Delete ../save/*.wav
void MainWindow::decoderFinished() //decoderFinished
{
qDebug() << "Decoder Finished";
}
//Delete ../save/*.wav
void MainWindow::on_actionDelete_all_wav_files_in_SaveDir_triggered()
{
int i;
@ -804,7 +814,7 @@ void MainWindow::on_actionAvailable_suffixes_and_add_on_prefixes_triggered()
void MainWindow::on_DecodeButton_clicked() //Decode request
{
qDebug() << "A" << g_pWideGraph->QSOfreq() << m_tol;
decode();
}
void MainWindow::freezeDecode(int n) //freezeDecode()
@ -814,7 +824,10 @@ void MainWindow::freezeDecode(int n) //freezeDecode()
void MainWindow::decode() //decode()
{
// jt9DecodeThread.start(QThread::NormalPriority);
*future3 = QtConcurrent::run(decoder_, &m_TRperiod);
watcher3->setFuture(*future2);
}
@ -1391,4 +1404,3 @@ void MainWindow::on_TxFreqSpinBox_valueChanged(int n)
m_txFreq=n;
soundOutThread.setTxFreq(n);
}

View File

@ -7,6 +7,7 @@
#include <QHash>
#include "soundin.h"
#include "soundout.h"
#include "jt9decode.h"
#include "commons.h"
#include "sleep.h"
@ -32,6 +33,7 @@ public slots:
void dataSink(int k);
void diskDat();
void diskWriteFinished();
void decoderFinished();
void freezeDecode(int n);
void guiUpdate();
void doubleClickOnCall(QString hiscall, bool ctrl);
@ -166,8 +168,10 @@ private:
QFuture<void>* future1;
QFuture<void>* future2;
QFuture<void>* future3;
QFutureWatcher<void>* watcher1;
QFutureWatcher<void>* watcher2;
QFutureWatcher<void>* watcher3;
QProcess proc_m65;
@ -188,6 +192,7 @@ private:
SoundInThread soundInThread; //Instantiate the audio threads
SoundOutThread soundOutThread;
JT9DecodeThread jt9DecodeThread;
//---------------------------------------------------- private functions
void readSettings();
@ -215,8 +220,12 @@ void symspec_(int* k, int* ntrperiod, int* nsps, int* ndiskdat,
int* nb, int* m_NBslider, float* px, float s[], float red[],
float* f0a, float* df3, int* nhsym, int* nzap,
float* slimit, uchar lstrong[]);
void genjt9_(char* msg, int* minutes, char* msgsent, int itone[],
int len1, int len2);
void decoder_(int* ntrperiod);
int ptt_(int* nport, int* itx, int* iptt);
}

View File

@ -6,7 +6,7 @@
QT += core gui network
CONFIG += qwt thread
#CONFIG += console
CONFIG += console
TARGET = wsjtx
VERSION = 0.2
@ -35,7 +35,8 @@ QMAKE_EXTRA_COMPILERS += gfortran
SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \
soundin.cpp soundout.cpp devsetup.cpp \
widegraph.cpp getfile.cpp \
displaytext.cpp getdev.cpp
displaytext.cpp getdev.cpp \
jt9decode.cpp
win32 {
SOURCES += killbyname.cpp
@ -44,6 +45,7 @@ SOURCES += killbyname.cpp
HEADERS += mainwindow.h plotter.h soundin.h soundout.h \
about.h devsetup.h widegraph.h getfile.h \
commons.h sleep.h displaytext.h \
jt9decode.h
DEFINES += __cplusplus