mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Minor code cleanup...
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2679 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8750631a09
commit
b29c581e14
@ -9,12 +9,10 @@
|
|||||||
#include <portaudio.h>
|
#include <portaudio.h>
|
||||||
|
|
||||||
int itone[85]; //Tx audio tones for 85 symbols
|
int itone[85]; //Tx audio tones for 85 symbols
|
||||||
int nwave; //Length of Tx waveform
|
|
||||||
bool btxok; //True if OK to transmit
|
bool btxok; //True if OK to transmit
|
||||||
double outputLatency; //Latency in seconds
|
double outputLatency; //Latency in seconds
|
||||||
float c0[2*1800*1500];
|
float c0[2*1800*1500];
|
||||||
|
|
||||||
//qint16 id[30*48000];
|
|
||||||
|
|
||||||
WideGraph* g_pWideGraph = NULL;
|
WideGraph* g_pWideGraph = NULL;
|
||||||
|
|
||||||
@ -149,13 +147,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
watcher3 = new QFutureWatcher<void>;
|
watcher3 = new QFutureWatcher<void>;
|
||||||
connect(watcher3, SIGNAL(finished()),this,SLOT(decoderFinished()));
|
connect(watcher3, SIGNAL(finished()),this,SLOT(decoderFinished()));
|
||||||
|
|
||||||
// Assign input device and start input thread
|
|
||||||
soundInThread.setInputDevice(m_paInDevice);
|
soundInThread.setInputDevice(m_paInDevice);
|
||||||
soundInThread.start(QThread::HighestPriority);
|
soundInThread.start(QThread::HighestPriority);
|
||||||
// Assign output device and start output thread
|
|
||||||
soundOutThread.setOutputDevice(m_paOutDevice);
|
soundOutThread.setOutputDevice(m_paOutDevice);
|
||||||
soundOutThread.setTxFreq(m_txFreq);
|
soundOutThread.setTxFreq(m_txFreq);
|
||||||
|
|
||||||
m_monitoring=true; // Start with Monitoring ON
|
m_monitoring=true; // Start with Monitoring ON
|
||||||
soundInThread.setMonitoring(m_monitoring);
|
soundInThread.setMonitoring(m_monitoring);
|
||||||
m_diskData=false;
|
m_diskData=false;
|
||||||
@ -331,7 +326,8 @@ void MainWindow::dataSink(int k)
|
|||||||
ndiskdat=0;
|
ndiskdat=0;
|
||||||
jt9com_.ndiskdat=0;
|
jt9com_.ndiskdat=0;
|
||||||
}
|
}
|
||||||
// Get power, spectrum, nkhz, and ihsym
|
|
||||||
|
// Get power, spectrum, and ihsym
|
||||||
nb=0;
|
nb=0;
|
||||||
if(m_NB) nb=1;
|
if(m_NB) nb=1;
|
||||||
trmin=m_TRperiod/60;
|
trmin=m_TRperiod/60;
|
||||||
@ -373,7 +369,7 @@ void MainWindow::dataSink(int k)
|
|||||||
ntr0=ntr;
|
ntr0=ntr;
|
||||||
n=0;
|
n=0;
|
||||||
}
|
}
|
||||||
// This is a bit strange. Why do we need the "-3" ??
|
// This is a bit strange. Why do we need the "-3" ???
|
||||||
if(ihsym == m_hsymStop-3) {
|
if(ihsym == m_hsymStop-3) {
|
||||||
jt9com_.npts8=(ihsym*m_nsps)/16;
|
jt9com_.npts8=(ihsym*m_nsps)/16;
|
||||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||||
@ -555,7 +551,6 @@ void MainWindow::bumpDF(int n) //bumpDF()
|
|||||||
bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter()
|
bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter()
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::KeyPress) {
|
if (event->type() == QEvent::KeyPress) {
|
||||||
//Use the event in parent using its keyPressEvent()
|
|
||||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||||
MainWindow::keyPressEvent(keyEvent);
|
MainWindow::keyPressEvent(keyEvent);
|
||||||
return QObject::eventFilter(object, event);
|
return QObject::eventFilter(object, event);
|
||||||
@ -613,7 +608,7 @@ void MainWindow::OnExit()
|
|||||||
{
|
{
|
||||||
g_pWideGraph->saveSettings();
|
g_pWideGraph->saveSettings();
|
||||||
m_killAll=true;
|
m_killAll=true;
|
||||||
qApp->exit(0); // Exit the event loop
|
qApp->exit(0); // Exit the event loop
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_stopButton_clicked() //stopButton
|
void MainWindow::on_stopButton_clicked() //stopButton
|
||||||
@ -1007,8 +1002,7 @@ void MainWindow::guiUpdate()
|
|||||||
QString utc = " " + t.time().toString() + " ";
|
QString utc = " " + t.time().toString() + " ";
|
||||||
ui->labUTC->setText(utc);
|
ui->labUTC->setText(utc);
|
||||||
if(!m_monitoring and !m_diskData) {
|
if(!m_monitoring and !m_diskData) {
|
||||||
ui->xThermo->setValue(0.0); // Set Rx level to 20
|
ui->xThermo->setValue(0.0);
|
||||||
// lab3->setText(" Rx noise: 0.0 ");
|
|
||||||
}
|
}
|
||||||
m_hsym0=khsym;
|
m_hsym0=khsym;
|
||||||
m_sec0=nsec;
|
m_sec0=nsec;
|
||||||
@ -1196,11 +1190,9 @@ void MainWindow::on_addButton_clicked() //Add button
|
|||||||
|
|
||||||
void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
||||||
{
|
{
|
||||||
// if(t.length()<1) return 0;
|
|
||||||
char message[23];
|
char message[23];
|
||||||
char msgsent[23];
|
char msgsent[23];
|
||||||
int len1=22;
|
int len1=22;
|
||||||
int mode65=0; //mode65 ==> check message but don't make wave()
|
|
||||||
double samfac=1.0;
|
double samfac=1.0;
|
||||||
int nsendingsh=0;
|
int nsendingsh=0;
|
||||||
int mwave;
|
int mwave;
|
||||||
|
Loading…
Reference in New Issue
Block a user