mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
I think sequencing is now OK when Auto is turned OFF.
Also, F3 (TxMute) now works. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2786 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
dcbc933fce
commit
99a28c81df
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
int itone[85]; //Tx audio tones for 85 symbols
|
int itone[85]; //Tx audio tones for 85 symbols
|
||||||
bool btxok; //True if OK to transmit
|
bool btxok; //True if OK to transmit
|
||||||
|
bool btxMute;
|
||||||
double outputLatency; //Latency in seconds
|
double outputLatency; //Latency in seconds
|
||||||
//float c0[2*1800*1500];
|
//float c0[2*1800*1500];
|
||||||
|
|
||||||
@ -98,7 +99,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
m_auto=false;
|
m_auto=false;
|
||||||
m_waterfallAvg = 1;
|
m_waterfallAvg = 1;
|
||||||
m_txFirst=false;
|
m_txFirst=false;
|
||||||
m_txMute=false;
|
btxMute=false;
|
||||||
btxok=false;
|
btxok=false;
|
||||||
m_restart=false;
|
m_restart=false;
|
||||||
m_transmitting=false;
|
m_transmitting=false;
|
||||||
@ -523,7 +524,7 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
|||||||
switch(e->key())
|
switch(e->key())
|
||||||
{
|
{
|
||||||
case Qt::Key_F3:
|
case Qt::Key_F3:
|
||||||
m_txMute=!m_txMute;
|
btxMute=!btxMute;
|
||||||
break;
|
break;
|
||||||
case Qt::Key_F4:
|
case Qt::Key_F4:
|
||||||
ui->dxCallEntry->setText("");
|
ui->dxCallEntry->setText("");
|
||||||
@ -1022,7 +1023,7 @@ void MainWindow::guiUpdate()
|
|||||||
if(f.exists() and fmod(tsec,m_TRperiod)<1.0 + 85.0*m_nsps/12000.0)
|
if(f.exists() and fmod(tsec,m_TRperiod)<1.0 + 85.0*m_nsps/12000.0)
|
||||||
bTxTime=true;
|
bTxTime=true;
|
||||||
|
|
||||||
if(bTxTime and iptt==0 and !m_txMute) {
|
if(bTxTime and iptt==0 and !btxMute) {
|
||||||
int itx=1;
|
int itx=1;
|
||||||
int ierr = ptt(m_pttPort,itx,&iptt); // Raise PTT
|
int ierr = ptt(m_pttPort,itx,&iptt); // Raise PTT
|
||||||
/*
|
/*
|
||||||
@ -1041,7 +1042,7 @@ void MainWindow::guiUpdate()
|
|||||||
soundOutThread.start(QThread::HighPriority);
|
soundOutThread.start(QThread::HighPriority);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!bTxTime || m_txMute) {
|
if(!bTxTime || btxMute) {
|
||||||
btxok=false;
|
btxok=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1095,7 +1096,9 @@ void MainWindow::guiUpdate()
|
|||||||
|
|
||||||
// If btxok was just lowered, start a countdown for lowering PTT
|
// If btxok was just lowered, start a countdown for lowering PTT
|
||||||
if(!btxok && btxok0 && iptt==1) nc0=-11; //RxDelay = 1.0 s
|
if(!btxok && btxok0 && iptt==1) nc0=-11; //RxDelay = 1.0 s
|
||||||
if(nc0 <= 0) nc0++;
|
if(nc0 <= 0) {
|
||||||
|
nc0++;
|
||||||
|
}
|
||||||
if(nc0 == 0) {
|
if(nc0 == 0) {
|
||||||
int itx=0;
|
int itx=0;
|
||||||
int ierr=ptt(m_pttPort,itx,&iptt); // Lower PTT
|
int ierr=ptt(m_pttPort,itx,&iptt); // Lower PTT
|
||||||
@ -1106,7 +1109,7 @@ void MainWindow::guiUpdate()
|
|||||||
msgBox(s);
|
msgBox(s);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if(!m_txMute) soundOutThread.quitExecution=true;
|
if(!btxMute) soundOutThread.quitExecution=true;
|
||||||
m_transmitting=false;
|
m_transmitting=false;
|
||||||
if(m_auto) {
|
if(m_auto) {
|
||||||
m_monitoring=true;
|
m_monitoring=true;
|
||||||
|
@ -146,7 +146,6 @@ private:
|
|||||||
bool m_decoderBusy;
|
bool m_decoderBusy;
|
||||||
bool m_txFirst;
|
bool m_txFirst;
|
||||||
bool m_auto;
|
bool m_auto;
|
||||||
bool m_txMute;
|
|
||||||
bool m_restart;
|
bool m_restart;
|
||||||
bool m_startAnother;
|
bool m_startAnother;
|
||||||
bool m_saveSynced;
|
bool m_saveSynced;
|
||||||
|
11
soundout.cpp
11
soundout.cpp
@ -8,6 +8,8 @@ extern "C" {
|
|||||||
|
|
||||||
extern float gran(); //Noise generator (for tests only)
|
extern float gran(); //Noise generator (for tests only)
|
||||||
extern int itone[85]; //Tx audio tones for 85 symbols
|
extern int itone[85]; //Tx audio tones for 85 symbols
|
||||||
|
extern bool btxok;
|
||||||
|
extern bool btxMute;
|
||||||
extern double outputLatency;
|
extern double outputLatency;
|
||||||
|
|
||||||
typedef struct //Parameters sent to or received from callback function
|
typedef struct //Parameters sent to or received from callback function
|
||||||
@ -17,7 +19,6 @@ typedef struct //Parameters sent to or received from callback function
|
|||||||
int ntrperiod;
|
int ntrperiod;
|
||||||
int ntxfreq;
|
int ntxfreq;
|
||||||
int ncall;
|
int ncall;
|
||||||
bool txOK;
|
|
||||||
bool txMute;
|
bool txMute;
|
||||||
bool bRestart;
|
bool bRestart;
|
||||||
} paUserData;
|
} paUserData;
|
||||||
@ -74,11 +75,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
if(i4<-32767) i4=-32767;
|
if(i4<-32767) i4=-32767;
|
||||||
i2=i4;
|
i2=i4;
|
||||||
}
|
}
|
||||||
/*
|
if(!btxok or btxMute) i2=0;
|
||||||
if(udata->txMute) i2=0;
|
|
||||||
if(!udata->txOK) i2=0;
|
|
||||||
if(ic > 85*udata->nsps) i2=0;
|
|
||||||
*/
|
|
||||||
*wptr++ = i2; //left
|
*wptr++ = i2; //left
|
||||||
ic++;
|
ic++;
|
||||||
}
|
}
|
||||||
@ -111,7 +108,6 @@ void SoundOutThread::run()
|
|||||||
udata.ntrperiod=m_TRperiod;
|
udata.ntrperiod=m_TRperiod;
|
||||||
udata.ntxfreq=m_txFreq;
|
udata.ntxfreq=m_txFreq;
|
||||||
udata.ncall=0;
|
udata.ncall=0;
|
||||||
udata.txOK=false;
|
|
||||||
udata.txMute=m_txMute;
|
udata.txMute=m_txMute;
|
||||||
udata.bRestart=true;
|
udata.bRestart=true;
|
||||||
|
|
||||||
@ -143,7 +139,6 @@ void SoundOutThread::run()
|
|||||||
udata.nsps=m_nsps;
|
udata.nsps=m_nsps;
|
||||||
udata.ntrperiod=m_TRperiod;
|
udata.ntrperiod=m_TRperiod;
|
||||||
udata.ntxfreq=m_txFreq;
|
udata.ntxfreq=m_txFreq;
|
||||||
udata.txOK=m_txOK;
|
|
||||||
udata.txMute=m_txMute;
|
udata.txMute=m_txMute;
|
||||||
|
|
||||||
m_SamFacOut=1.0;
|
m_SamFacOut=1.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user