mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-23 18:02:29 -04:00
Protect against faulty or missing tsil.3q file.
This commit is contained in:
parent
92c9dd7fd6
commit
16f9f50263
@ -20,7 +20,12 @@ subroutine get_q3list(fname,nlist,list)
|
||||
|
||||
nhist2=0
|
||||
open(24,file=fname,status='unknown',form='unformatted')
|
||||
read(24,end=1) nhist2,callers(1:nhist2)
|
||||
read(24,end=1) nhist2
|
||||
if(nhist2.ge.1 .and. nhist2.le.40) then
|
||||
read(24,end=1) callers(1:nhist2)
|
||||
else
|
||||
nhist2=0
|
||||
endif
|
||||
1 close(24)
|
||||
|
||||
now=time()
|
||||
|
@ -115,7 +115,9 @@ contains
|
||||
! NA VHF, WW-Digi, or ARRL Digi Contest
|
||||
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
||||
form='unformatted')
|
||||
read(24,end=2) nhist2,callers(1:nhist2)
|
||||
read(24,end=2) nhist2
|
||||
if(nhist2.ge.1 .and. nhist2.le.40) then
|
||||
read(24,end=2) callers(1:nhist2)
|
||||
now=time()
|
||||
do i=1,nhist2
|
||||
hours=(now - callers(i)%nsec)/3600.0
|
||||
@ -124,6 +126,9 @@ contains
|
||||
nhist2=nhist2-1
|
||||
endif
|
||||
enddo
|
||||
else
|
||||
nhist2=0
|
||||
endif
|
||||
2 close(24)
|
||||
endif
|
||||
|
||||
|
@ -913,10 +913,13 @@ subroutine q65_hist2(nfreq,msg0,callers,nhist2)
|
||||
callers(nhist2)%nfreq=nfreq
|
||||
endif
|
||||
|
||||
if(nhist2.ge.1 .and. nhist2.le.40) then
|
||||
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
||||
form='unformatted')
|
||||
write(24) nhist2,callers(1:nhist2)
|
||||
write(24) nhist2
|
||||
write(24) callers(1:nhist2)
|
||||
close(24)
|
||||
endif
|
||||
|
||||
900 return
|
||||
end subroutine q65_hist2
|
||||
|
@ -59,6 +59,7 @@ void ActiveStations::write_settings ()
|
||||
|
||||
void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
||||
{
|
||||
if(mode!=m_mode) {
|
||||
m_mode=mode;
|
||||
if(m_mode=="Q65") {
|
||||
ui->header_label2->setText(" N Frx Fsked S/N Call Grid Tx Age");
|
||||
@ -76,13 +77,14 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
||||
ui->label_3->setVisible(!b);
|
||||
ui->score->setVisible(!b);
|
||||
ui->sbMaxRecent->setVisible(!b);
|
||||
ui->RecentStationsPlainTextEdit->insertPlainText(t);
|
||||
|
||||
b=(m_mode!="Q65-pileup");
|
||||
ui->sbMaxAge->setVisible(b);
|
||||
ui->label->setVisible(b);
|
||||
ui->rate->setVisible(b);
|
||||
}
|
||||
ui->RecentStationsPlainTextEdit->insertPlainText(t);
|
||||
}
|
||||
|
||||
int ActiveStations::maxRecent()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user