mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	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:
		
							parent
							
								
									884631a559
								
							
						
					
					
						commit
						5d38203e58
					
				
							
								
								
									
										6
									
								
								jt9decode.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								jt9decode.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					#include "jt9decode.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void JT9DecodeThread::run()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  qDebug() << "Decode Thread started";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										29
									
								
								jt9decode.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								jt9decode.h
									
									
									
									
									
										Normal 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
 | 
				
			||||||
@ -23,7 +23,7 @@ subroutine sync9(ss,tstep,f0a,df3,ntol,nfqso,sync,fpk,ccfred)
 | 
				
			|||||||
     if(ia.lt.1) ia=1
 | 
					     if(ia.lt.1) ia=1
 | 
				
			||||||
     if(ib.gt.NSMAX) ib=NSMAX
 | 
					     if(ib.gt.NSMAX) ib=NSMAX
 | 
				
			||||||
  endif
 | 
					  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.
 | 
					  sbest=0.
 | 
				
			||||||
  lagmax=2.5/tstep + 0.9999
 | 
					  lagmax=2.5/tstep + 0.9999
 | 
				
			||||||
 | 
				
			|||||||
@ -143,6 +143,10 @@ MainWindow::MainWindow(QWidget *parent) :
 | 
				
			|||||||
  watcher2 = new QFutureWatcher<void>;
 | 
					  watcher2 = new QFutureWatcher<void>;
 | 
				
			||||||
  connect(watcher2, SIGNAL(finished()),this,SLOT(diskWriteFinished()));
 | 
					  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
 | 
					// Assign input device and start input thread
 | 
				
			||||||
  soundInThread.setInputDevice(m_paInDevice);
 | 
					  soundInThread.setInputDevice(m_paInDevice);
 | 
				
			||||||
  soundInThread.start(QThread::HighestPriority);
 | 
					  soundInThread.start(QThread::HighestPriority);
 | 
				
			||||||
@ -732,6 +736,12 @@ void MainWindow::diskWriteFinished()                       //diskWriteFinished
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  qDebug() << "diskWriteFinished";
 | 
					  qDebug() << "diskWriteFinished";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::decoderFinished()                       //decoderFinished
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  qDebug() << "Decoder Finished";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//Delete ../save/*.wav
 | 
					//Delete ../save/*.wav
 | 
				
			||||||
void MainWindow::on_actionDelete_all_wav_files_in_SaveDir_triggered()
 | 
					void MainWindow::on_actionDelete_all_wav_files_in_SaveDir_triggered()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -804,7 +814,7 @@ void MainWindow::on_actionAvailable_suffixes_and_add_on_prefixes_triggered()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void MainWindow::on_DecodeButton_clicked()                    //Decode request
 | 
					void MainWindow::on_DecodeButton_clicked()                    //Decode request
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  qDebug() << "A" << g_pWideGraph->QSOfreq() << m_tol;
 | 
					  decode();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void MainWindow::freezeDecode(int n)                          //freezeDecode()
 | 
					void MainWindow::freezeDecode(int n)                          //freezeDecode()
 | 
				
			||||||
@ -814,7 +824,10 @@ void MainWindow::freezeDecode(int n)                          //freezeDecode()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void MainWindow::decode()                                       //decode()
 | 
					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;
 | 
					  m_txFreq=n;
 | 
				
			||||||
  soundOutThread.setTxFreq(n);
 | 
					  soundOutThread.setTxFreq(n);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@
 | 
				
			|||||||
#include <QHash>
 | 
					#include <QHash>
 | 
				
			||||||
#include "soundin.h"
 | 
					#include "soundin.h"
 | 
				
			||||||
#include "soundout.h"
 | 
					#include "soundout.h"
 | 
				
			||||||
 | 
					#include "jt9decode.h"
 | 
				
			||||||
#include "commons.h"
 | 
					#include "commons.h"
 | 
				
			||||||
#include "sleep.h"
 | 
					#include "sleep.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -32,6 +33,7 @@ public slots:
 | 
				
			|||||||
  void dataSink(int k);
 | 
					  void dataSink(int k);
 | 
				
			||||||
  void diskDat();
 | 
					  void diskDat();
 | 
				
			||||||
  void diskWriteFinished();
 | 
					  void diskWriteFinished();
 | 
				
			||||||
 | 
					  void decoderFinished();
 | 
				
			||||||
  void freezeDecode(int n);
 | 
					  void freezeDecode(int n);
 | 
				
			||||||
  void guiUpdate();
 | 
					  void guiUpdate();
 | 
				
			||||||
  void doubleClickOnCall(QString hiscall, bool ctrl);
 | 
					  void doubleClickOnCall(QString hiscall, bool ctrl);
 | 
				
			||||||
@ -166,8 +168,10 @@ private:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    QFuture<void>* future1;
 | 
					    QFuture<void>* future1;
 | 
				
			||||||
    QFuture<void>* future2;
 | 
					    QFuture<void>* future2;
 | 
				
			||||||
 | 
					    QFuture<void>* future3;
 | 
				
			||||||
    QFutureWatcher<void>* watcher1;
 | 
					    QFutureWatcher<void>* watcher1;
 | 
				
			||||||
    QFutureWatcher<void>* watcher2;
 | 
					    QFutureWatcher<void>* watcher2;
 | 
				
			||||||
 | 
					    QFutureWatcher<void>* watcher3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QProcess proc_m65;
 | 
					    QProcess proc_m65;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -188,6 +192,7 @@ private:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    SoundInThread soundInThread;             //Instantiate the audio threads
 | 
					    SoundInThread soundInThread;             //Instantiate the audio threads
 | 
				
			||||||
    SoundOutThread soundOutThread;
 | 
					    SoundOutThread soundOutThread;
 | 
				
			||||||
 | 
					    JT9DecodeThread jt9DecodeThread;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//---------------------------------------------------- private functions
 | 
					//---------------------------------------------------- private functions
 | 
				
			||||||
    void readSettings();
 | 
					    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[],
 | 
					              int* nb, int* m_NBslider, float* px, float s[], float red[],
 | 
				
			||||||
              float* f0a, float* df3, int* nhsym, int* nzap,
 | 
					              float* f0a, float* df3, int* nhsym, int* nzap,
 | 
				
			||||||
               float* slimit, uchar lstrong[]);
 | 
					               float* slimit, uchar lstrong[]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void genjt9_(char* msg, int* minutes, char* msgsent, int itone[],
 | 
					void genjt9_(char* msg, int* minutes, char* msgsent, int itone[],
 | 
				
			||||||
             int len1, int len2);
 | 
					             int len1, int len2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void decoder_(int* ntrperiod);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ptt_(int* nport, int* itx, int* iptt);
 | 
					int ptt_(int* nport, int* itx, int* iptt);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
QT       += core gui network
 | 
					QT       += core gui network
 | 
				
			||||||
CONFIG   += qwt thread
 | 
					CONFIG   += qwt thread
 | 
				
			||||||
#CONFIG   += console
 | 
					CONFIG   += console
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TARGET = wsjtx
 | 
					TARGET = wsjtx
 | 
				
			||||||
VERSION = 0.2
 | 
					VERSION = 0.2
 | 
				
			||||||
@ -35,7 +35,8 @@ QMAKE_EXTRA_COMPILERS += gfortran
 | 
				
			|||||||
SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \
 | 
					SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \
 | 
				
			||||||
    soundin.cpp soundout.cpp devsetup.cpp \
 | 
					    soundin.cpp soundout.cpp devsetup.cpp \
 | 
				
			||||||
    widegraph.cpp getfile.cpp \
 | 
					    widegraph.cpp getfile.cpp \
 | 
				
			||||||
    displaytext.cpp getdev.cpp
 | 
					    displaytext.cpp getdev.cpp \
 | 
				
			||||||
 | 
					    jt9decode.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
win32 {
 | 
					win32 {
 | 
				
			||||||
SOURCES += killbyname.cpp
 | 
					SOURCES += killbyname.cpp
 | 
				
			||||||
@ -44,6 +45,7 @@ SOURCES += killbyname.cpp
 | 
				
			|||||||
HEADERS  += mainwindow.h plotter.h soundin.h soundout.h \
 | 
					HEADERS  += mainwindow.h plotter.h soundin.h soundout.h \
 | 
				
			||||||
            about.h devsetup.h widegraph.h getfile.h \
 | 
					            about.h devsetup.h widegraph.h getfile.h \
 | 
				
			||||||
            commons.h sleep.h displaytext.h \
 | 
					            commons.h sleep.h displaytext.h \
 | 
				
			||||||
 | 
					    jt9decode.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFINES += __cplusplus
 | 
					DEFINES += __cplusplus
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user