Fix up message generation when short messages are used and decoded.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6466 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-02-04 17:30:04 +00:00
parent cca53ff18a
commit 764e2f95d5
2 changed files with 10 additions and 2 deletions

View File

@ -133,7 +133,7 @@ void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid)
call = msg.mid(i1+1); call = msg.mid(i1+1);
int i2 = call.indexOf(" "); int i2 = call.indexOf(" ");
grid = call.mid(i2+1,4); grid = call.mid(i2+1,4);
call = call.mid(0,i2); call = call.mid(0,i2).replace(">","");
} }
int DecodedText::timeInSeconds() int DecodedText::timeInSeconds()

View File

@ -2920,12 +2920,20 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
m_hisGrid = ui->dxGridEntry->text(); m_hisGrid = ui->dxGridEntry->text();
QString rpt = decodedtext.report(); QString rpt = decodedtext.report();
ui->rptSpinBox->setValue(rpt.toInt()); int n=rpt.toInt();
if(m_mode=="JTMSK" and m_bShMsgs) {
n=26;
if(rpt.toInt()>4) n=27;
if(rpt.toInt()>8) n=28;
rpt=QString::number(n);
}
ui->rptSpinBox->setValue(n);
genStdMsgs(rpt); genStdMsgs(rpt);
// Determine appropriate response to received message // Determine appropriate response to received message
auto dtext = " " + decodedtext.string () + " "; auto dtext = " " + decodedtext.string () + " ";
if(dtext.contains (" " + m_baseCall + " ") if(dtext.contains (" " + m_baseCall + " ")
|| dtext.contains ("<" + m_baseCall + " ")
|| dtext.contains ("/" + m_baseCall + " ") || dtext.contains ("/" + m_baseCall + " ")
|| dtext.contains (" " + m_baseCall + "/") || dtext.contains (" " + m_baseCall + "/")
|| (firstcall == "DE" && ((t4.size () > 7 && t4.at(7) != "73") || t4.size () <= 7))) || (firstcall == "DE" && ((t4.size () > 7 && t4.at(7) != "73") || t4.size () <= 7)))