mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-24 22:25:17 -04:00
Implement wsjtx_rx.log, and fix the newdat and nagain parameters.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2695 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e9f2cbfb1d
commit
88b62a2d74
@ -15,6 +15,9 @@ subroutine decoder(ntrSeconds,c0)
|
|||||||
complex c0(NDMAX)
|
complex c0(NDMAX)
|
||||||
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat, &
|
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat, &
|
||||||
ntr,nfqso,nagain,newdat,npts8,nfb,ntol,kin
|
ntr,nfqso,nagain,newdat,npts8,nfb,ntol,kin
|
||||||
|
logical first
|
||||||
|
data first/.true./
|
||||||
|
save
|
||||||
|
|
||||||
ntrMinutes=ntrSeconds/60
|
ntrMinutes=ntrSeconds/60
|
||||||
newdat=1
|
newdat=1
|
||||||
@ -47,16 +50,21 @@ subroutine decoder(ntrSeconds,c0)
|
|||||||
call spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
call spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
||||||
call decode9(i1SoftSymbols,msg)
|
call decode9(i1SoftSymbols,msg)
|
||||||
|
|
||||||
open(13,file='decoded.txt',status='unknown')
|
|
||||||
rewind 13
|
|
||||||
! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg
|
|
||||||
nsync=sync
|
nsync=sync
|
||||||
nsnr=nint(snr)
|
nsnr=nint(snr)
|
||||||
width=0.0
|
width=0.0
|
||||||
|
open(13,file='decoded.txt',status='unknown')
|
||||||
|
rewind 13
|
||||||
write(13,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
write(13,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
||||||
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
||||||
call flush(13)
|
call flush(13)
|
||||||
close(13)
|
close(13)
|
||||||
|
if(first) then
|
||||||
|
open(14,file='wsjtx_rx.log',status='unknown',position='append')
|
||||||
|
first=.false.
|
||||||
|
endif
|
||||||
|
write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
||||||
|
call flush(14)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine decoder
|
end subroutine decoder
|
||||||
|
@ -371,6 +371,8 @@ void MainWindow::dataSink(int k)
|
|||||||
// 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;
|
||||||
|
jt9com_.newdat=1;
|
||||||
|
jt9com_.nagain=0;
|
||||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||||
m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
|
m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
|
||||||
decode(); //Start the decoder
|
decode(); //Start the decoder
|
||||||
@ -821,23 +823,42 @@ void MainWindow::on_actionAvailable_suffixes_and_add_on_prefixes_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_DecodeButton_clicked() //Decode request
|
void MainWindow::on_DecodeButton_clicked() //Decode request
|
||||||
{
|
{
|
||||||
decode();
|
if(!m_decoderBusy) {
|
||||||
|
jt9com_.newdat=0;
|
||||||
|
jt9com_.nagain=1;
|
||||||
|
decode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::freezeDecode(int n) //freezeDecode()
|
void MainWindow::freezeDecode(int n) //freezeDecode()
|
||||||
{
|
{
|
||||||
decode();
|
if(!m_decoderBusy) {
|
||||||
|
jt9com_.newdat=0;
|
||||||
|
jt9com_.nagain=1;
|
||||||
|
decode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::decode() //decode()
|
void MainWindow::decode() //decode()
|
||||||
{
|
{
|
||||||
decodeBusy(true);
|
decodeBusy(true);
|
||||||
ui->DecodeButton->setStyleSheet(m_pbdecoding_style1);
|
ui->DecodeButton->setStyleSheet(m_pbdecoding_style1);
|
||||||
jt9com_.newdat=1;
|
|
||||||
jt9com_.nagain=0;
|
if(jt9com_.nagain==0 && (!m_diskData)) {
|
||||||
|
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||||
|
int imin=ms/60000;
|
||||||
|
int ihr=imin/60;
|
||||||
|
imin=imin%60;
|
||||||
|
if(m_TRperiod>60) imin=imin - imin%(m_TRperiod/60);
|
||||||
|
jt9com_.nutc=100*ihr + imin;
|
||||||
|
}
|
||||||
|
|
||||||
|
// jt9com_.newdat=1;
|
||||||
|
// jt9com_.nagain=0;
|
||||||
jt9com_.nfqso=g_pWideGraph->QSOfreq();
|
jt9com_.nfqso=g_pWideGraph->QSOfreq();
|
||||||
m_tol=g_pWideGraph->Tol();
|
m_tol=g_pWideGraph->Tol();
|
||||||
jt9com_.ntol=m_tol;
|
jt9com_.ntol=m_tol;
|
||||||
|
qDebug() << "A" << jt9com_.newdat << jt9com_.nagain;
|
||||||
*future3 = QtConcurrent::run(decoder_, &m_TRperiod, &c0[0]);
|
*future3 = QtConcurrent::run(decoder_, &m_TRperiod, &c0[0]);
|
||||||
watcher3->setFuture(*future3);
|
watcher3->setFuture(*future3);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user