Allow for, and add where necessary, a second character after mode

The decoded message processing relies on fixed column positions so the
extra character used in message  averaging to indicate sync flips must
also be allowed for in other modes.  This is done by inserting a space
character.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6681 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-05-17 19:35:38 +00:00
parent 6bbfb0e1f1
commit f398495cfc
4 changed files with 44 additions and 40 deletions

View File

@ -172,6 +172,7 @@ void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 tx
{
QString bg=color_TxMsg.name();
QString t1=" @ ";
if(modeTx=="JT4") t1=" $ ";
if(modeTx=="JT65") t1=" # ";
if(modeTx=="JTMSK") t1=" & ";
QString t2;

View File

@ -173,7 +173,7 @@ subroutine fast9(id2,narg,line)
!### Might want to use decoded message to get a complete estimate of S/N.
nline=nline+1
write(line(nline),1000) nutc,nsnr,t0,nint(freq),msg,char(0)
1000 format(i6.6,i4,f5.1,i5,1x,'@',1x,a22,a1)
1000 format(i6.6,i4,f5.1,i5,1x,'@ ',1x,a22,a1)
ntot=ntot+1
! write(70,5001) nsaved,isave,nline,maxlines,ntot,nutc,msg
!5001 format(5i5,i7.6,1x,a22)

View File

@ -1854,7 +1854,10 @@ void MainWindow::decode() //decode()
}
}
dec_data.params.nfqso=m_wideGraph->rxFreq();
dec_data.params.ndepth=m_ndepth;
qint32 depth {m_ndepth};
if (!ui->actionInclude_averaging->isEnabled ()) depth &= ~16;
if (!ui->actionInclude_correlation->isEnabled ()) depth &= ~32;
dec_data.params.ndepth=depth;
dec_data.params.n2pass=1;
if(m_config.twoPass()) dec_data.params.n2pass=2;
dec_data.params.nranera=m_config.ntrials();
@ -2917,6 +2920,20 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
auto t4 = t3.replace (" CQ DX ", " CQ_DX ").split (" ", QString::SkipEmptyParts);
if(t4.size () < 6) return; //Skip the rest if no decoded text
int frequency = decodedtext.frequencyOffset();
if (ui->RxFreqSpinBox->isEnabled ())
{
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
}
if (decodedtext.isTX())
{
if (ctrl && ui->TxFreqSpinBox->isEnabled ())
{
ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
}
return;
}
int nmod=ntsec % (2*m_TRperiod);
m_txFirst=(nmod!=0);
ui->txFirstCheckBox->setChecked(m_txFirst);
@ -2953,7 +2970,6 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
return;
}
int frequency = decodedtext.frequencyOffset();
QString firstcall = decodedtext.call();
if(!m_bFastMode) {
// Don't change Tx freq if in a fast mode; also not if a station is calling me,
@ -2978,19 +2994,6 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
m_QSOText=decodedtext;
}
if (ui->RxFreqSpinBox->isEnabled ())
{
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
}
if (decodedtext.isTX())
{
if (ctrl && ui->TxFreqSpinBox->isEnabled ())
{
ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
}
return;
}
// prior DX call (possible QSO partner)
auto qso_partner_base_call = Radio::base_callsign (ui->dxCallEntry-> text ().toUpper ().trimmed ());
@ -5010,11 +5013,11 @@ void MainWindow::replayDecodes ()
void MainWindow::postDecode (bool is_new, QString const& message)
{
auto const& decode = message.trimmed ();
auto const& parts = decode.left (21).split (' ', QString::SkipEmptyParts);
auto const& parts = decode.left (22).split (' ', QString::SkipEmptyParts);
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][0], decode.mid (21));
, parts[2].toFloat (), parts[3].toUInt (), parts[4][0], decode.mid (22));
}
}