Adjust decodes displays and processing for extra csync indicator after mode

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6674 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-05-05 18:53:00 +00:00
parent 2c7ae5f9de
commit a45ea3cdff
4 changed files with 24 additions and 23 deletions

View File

@ -28,13 +28,13 @@ class DecodedText
{
public:
// These define the columns in the decoded text where fields are to be found.
// We rely on these columns being the same in the fortran code (lib/decode.f90) that formats the decoded text
// We rely on these columns being the same in the fortran code (lib/decoder.f90) that formats the decoded text
enum Columns { column_time = 0,
column_snr = 5,
column_dt = 9,
column_freq = 14,
column_mode = 19,
column_qsoText = 21 };
column_qsoText = 22 };
void operator=(const QString &rhs)
{

View File

@ -86,9 +86,9 @@ void DisplayText::_appendDXCCWorkedB4(DecodedText& t1, QString& bg,
int charsAvail = 48;
// the decoder (seems) to always generate 40 chars. For a normal CQ call, the last five are spaces
// TODO this magic 36 characters is also referenced in MainWindow::doubleClickOnCall()
int nmin=35;
// the decoder (seems) to always generate 41 chars. For a normal CQ call, the last five are spaces
// TODO this magic 37 characters is also referenced in MainWindow::doubleClickOnCall()
int nmin=37;
int i=t1.indexOf(" CQ ");
int k=t1.string().mid(i+4,3).toInt();
if(k>0 and k<999) nmin += 4;

View File

@ -23,7 +23,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
end type counting_jt9_decoder
real ss(184,NSMAX)
logical baddata,newdat65,newdat9
logical baddata,newdat65,newdat9,single_decode
integer*2 id2(NTMAX*12000)
type(params_block) :: params
real*4 dd(NTMAX*12000)
@ -32,6 +32,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
type(counting_jt65_decoder) :: my_jt65
type(counting_jt9_decoder) :: my_jt9
single_decode=iand(params%nexp_decode,32).ne.0
if(mod(params%nranera,2).eq.0) ntrials=10**(params%nranera/2)
if(mod(params%nranera,2).eq.1) ntrials=3*10**(params%nranera/2)
if(params%nranera.eq.0) ntrials=0
@ -223,7 +224,7 @@ contains
integer, intent(in) :: minsync
integer i,n
character*5 ctail,decoded*22,csync*2,fmt*33
character*5 ctail,decoded*22,csync*2
character*36 c
data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
@ -231,12 +232,11 @@ contains
! write(*,3301) ft,qual,nsmo,nsum,minsync,naggressive,sync !###
!3301 format('decoded.f90:',6i3,f5.1) !###
if (iand(params%nexp_decode,32).ne.0) print *, 'OK'
decoded=decoded0
fmt='(i4.4,i4,f5.1,i5,1x,a1,1x,a22,a5)'
if(iand(params%nexp_decode,32).ne.0) fmt='(i4.4,i4,f5.1,i5,1x,a2,1x,a22,a5)'
! fmt='(i4.4,i4,f5.1,i5,1x,a1,1x,a22,a5)'
! if(single_decode) fmt='(i4.4,i4,f5.1,i5,1x,a2,1x,a22,a5)'
if(ft.eq.0 .and. minsync.ge.0 .and. int(sync).lt.minsync) then
write(*,fmt) params%nutc,snr,dt,freq
write(*,1010) params%nutc,snr,dt,freq
else
ctail=' '
if(params%naggressive.gt.0 .and. ft.gt.0) then
@ -254,7 +254,7 @@ contains
endif
endif
csync='# '
if(nflip.ne.0 .and. sync.ge.max(0.0,float(minsync))) then
if(single_decode .and. nflip.ne.0 .and. sync.ge.max(0.0,float(minsync))) then
csync='#*'
if(nflip.eq.-1) then
csync='##'
@ -266,7 +266,8 @@ contains
endif
endif
endif
write(*,fmt) params%nutc,snr,dt,freq,csync,decoded,ctail
write(*,1010) params%nutc,snr,dt,freq,csync,decoded,ctail
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,a5)
endif
write(13,1012) params%nutc,nint(sync),snr,dt,float(freq),drift,decoded,ft,nsum,nsmo
@ -294,7 +295,7 @@ contains
!$omp critical(decode_results)
write(*,1000) params%nutc,snr,dt,nint(freq),decoded
1000 format(i4.4,i4,f5.1,i5,1x,'@',1x,a22)
1000 format(i4.4,i4,f5.1,i5,1x,'@ ',1x,a22)
write(13,1002) params%nutc,nint(sync),snr,dt,freq,drift,decoded
1002 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT9')
call flush(6)

View File

@ -560,7 +560,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->labAz->setStyleSheet("border: 0px;");
ui->labDist->setStyleSheet("border: 0px;");
auto t = "UTC dB DT Freq Message";
auto t = "UTC dB DT Freq Message";
ui->decodedTextLabel->setText(t);
ui->decodedTextLabel2->setText(t);
@ -2860,10 +2860,10 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
decodedtext = t2a;
if (decodedtext.indexOf(" CQ ") > 0) {
// TODO this magic 36 characters is also referenced in DisplayText::_appendDXCCWorkedB4()
auto eom_pos = decodedtext.string ().indexOf (' ', 35);
if (eom_pos < 35) eom_pos = decodedtext.string ().size () - 1; // we always want at least the characters
// to position 35
// TODO this magic 37 characters is also referenced in DisplayText::_appendDXCCWorkedB4()
auto eom_pos = decodedtext.string ().indexOf (' ', 36);
if (eom_pos < 36) eom_pos = decodedtext.string ().size () - 1; // we always want at least the characters
// to position 36
decodedtext = decodedtext.string ().left (eom_pos + 1); // remove DXCC entity and worked B4 status. TODO need a better way to do this
}
@ -3558,8 +3558,8 @@ void MainWindow::on_actionJT9_triggered()
ui->sbTR->setVisible(true);
} else {
m_TRperiod=60;
ui->decodedTextLabel->setText("UTC dB DT Freq Message");
ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
ui->decodedTextLabel->setText("UTC dB DT Freq Message");
ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
ui->sbTR->setVisible(false);
}
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
@ -3895,7 +3895,7 @@ void MainWindow::WSPR_config(bool b)
}
m_bSimplex = true;
} else {
ui->decodedTextLabel->setText("UTC dB DT Freq Message");
ui->decodedTextLabel->setText("UTC dB DT Freq Message");
auto_tx_label->setText (m_config.quick_call () ? "Auto-Tx-Enable Armed" : "Auto-Tx-Enable Disarmed");
m_bSimplex = false;
}
@ -4968,7 +4968,7 @@ void MainWindow::postDecode (bool is_new, QString const& message)
if (parts.size () >= 5)
{
m_messageClient->decode (is_new, QTime::fromString (parts[0], "hhmm"), parts[1].toInt ()
, parts[2].toFloat (), parts[3].toUInt (), parts[4], decode.mid (21));
, parts[2].toFloat (), parts[3].toUInt (), parts[4][0], decode.mid (21));
}
}