Fix issues with type 2 compound calls in contest mode

Message generation in  contest mode now generates the  correct Tx3 for
type 2 calls.

"<type-2> 73"  is a free  text so  needed special handling  in message
processing.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8064 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2017-09-01 21:29:02 +00:00
parent 51d50ecf78
commit f4903ae1bd
2 changed files with 16 additions and 7 deletions

View File

@ -2,6 +2,7 @@
#include <QStringList>
#include <QRegularExpression>
#include <QDebug>
extern "C" {
bool stdmsg_(char const * msg, bool contest_mode, char const * mygrid, int len_msg, int len_grid);
@ -60,7 +61,11 @@ QStringList DecodedText::messageWords () const
// extract up to the first four message words
return words_re.match (message_).capturedTexts ();
}
return message_.split (' '); // simple word split for free text messages
// simple word split for free text messages
auto words = message_.split (' ', QString::SkipEmptyParts);
// add whole message as item 0 to mimic RE capture list
words.prepend (message_);
return words;
}
QString DecodedText::CQersCall() const

View File

@ -4091,14 +4091,18 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
switch (m_config.type_2_msg_gen ())
{
case Configuration::type_2_msg_1_full:
t="DE " + my_callsign + " " + my_grid;
msgtype(t, ui->tx1);
t="DE " + my_callsign + " ";
msgtype(t + my_grid, ui->tx1);
if (!eme_short_codes) {
t=t0 + "R" + rpt;
msgtype(t, ui->tx3);
if ((m_mode=="MSK144" || m_mode=="FT8")
&& m_config.contestMode()) {
msgtype(t + "R " + my_grid, ui->tx3);
}
else {
msgtype(t + "R" + rpt, ui->tx3);
}
if ((m_mode != "JT4" && m_mode != "QRA64") || !m_bShMsgs) {
t="DE " + my_callsign + " 73";
msgtype(t, ui->tx5->lineEdit ());
msgtype(t + "73", ui->tx5->lineEdit ());
}
}
break;