Diagnostic writes to fort.71 in jt9a.f90.

This commit is contained in:
Joe Taylor 2020-03-11 14:02:19 -04:00
parent 199ff3dd3d
commit d69cb49e9a
2 changed files with 15 additions and 4 deletions

View File

@ -18,6 +18,7 @@ subroutine jt9a()
integer*1 attach_jt9
! integer*1 lock_jt9,unlock_jt9
integer size_jt9
integer itime(8)
! Multiple instances:
character*80 mykey
type(dec_data), pointer :: shared_data
@ -40,6 +41,7 @@ subroutine jt9a()
i1=attach_jt9()
msdelay=10
! Wait here until the .lock file is removed by GUI
10 inquire(file=trim(temp_dir)//'/.lock',exist=fileExists)
if(fileExists) then
call sleep_msec(msdelay)
@ -61,6 +63,12 @@ subroutine jt9a()
endif
call c_f_pointer(address_jt9(),shared_data)
local_params=shared_data%params !save a copy because wsjtx carries on accessing
call date_and_time(values=itime)
write(71,3001) 'AA',local_params%nutc,itime(7)+0.001*itime(8), &
nint(shared_data%ss(1,1)),local_params%nzhsym
3001 format(a2,i8,f8.3,2i6)
flush(71)
call flush(6)
call timer('decoder ',0)
if(local_params%nmode.eq.8 .and. local_params%ndiskdat) then
@ -79,9 +87,14 @@ subroutine jt9a()
endif
! Normal decoding pass
call multimode_decoder(shared_data%ss,shared_data%id2,local_params,12000)
! print*,'AAA',shared_data%ss(1,1)
call timer('decoder ',1)
call date_and_time(values=itime)
write(71,3001) 'BB',local_params%nutc,itime(7)+0.001*itime(8), &
nint(shared_data%ss(1,1)),local_params%nzhsym
flush(71)
! Wait here until GUI routine decodeDone() has re-created the .lock file
100 inquire(file=trim(temp_dir)//'/.lock',exist=fileExists)
if(fileExists) go to 10
call sleep_msec(msdelay)

View File

@ -2997,7 +2997,7 @@ void MainWindow::decode() //decode()
dec_data.params.mycall,dec_data.params.hiscall,8000,12,12)));
} else {
memcpy(to, from, qMin(mem_jt9->size(), size));
if(m_mode=="FT8") to_jt9(m_ihsym); //### TEMPORARY ? ###
if(m_mode=="FT8") to_jt9(m_ihsym); //Send m_ihsym to jt9[.exe]
QFile {m_config.temp_dir ().absoluteFilePath (".lock")}.remove (); // Allow jt9 to start
auto now = QDateTime::currentDateTimeUtc();
@ -3091,7 +3091,6 @@ void MainWindow::readFromStdout() //readFromStdout
{
while(proc_jt9.canReadLine()) {
auto line_read = proc_jt9.readLine ();
// qDebug() << "aa" << line_read;
if (auto p = std::strpbrk (line_read.constData (), "\n\r"))
{
// truncate before line ending chars
@ -3101,7 +3100,6 @@ void MainWindow::readFromStdout() //readFromStdout
//Pad 22-char msg to at least 37 chars
line_read = line_read.left(43) + " " + line_read.mid(43);
}
// qint64 ms=QDateTime::currentMSecsSinceEpoch() - m_msec0;
bool bAvgMsg=false;
int navg=0;
if(line_read.indexOf("<DecodeFinished>") >= 0) {