Better handling of compound callsigns

Option  to control  standard message  generation for  type 2  compound
callsign holders.

Process decoded  messages based  on either base  or full  callsign for
both DE and DX callsigns.

Change CW id when callsign changed in settings.

Merged from wsjtx-1.4 branch.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5000 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2015-03-04 12:22:33 +00:00
parent d3ca5fdc8e
commit 50901a5354
7 changed files with 178 additions and 52 deletions
+9 -3
View File
@@ -50,7 +50,7 @@ int DecodedText::snr()
*/
// find and extract any report. Returns true if this is a standard message
bool DecodedText::report(const QString myCall, /*mod*/QString& report)
bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /*mod*/QString& report)
{
QString msg=_string.mid(column_qsoText);
int i1=msg.indexOf("\r");
@@ -59,10 +59,16 @@ bool DecodedText::report(const QString myCall, /*mod*/QString& report)
bool b = stdmsg_(msg.mid(0,22).toLatin1().constData(),22); // stdmsg is a fortran routine that packs the text, unpacks it and compares the result
QStringList w=msg.split(" ",QString::SkipEmptyParts);
if(b and w[0]==myCall)
if(b && (w[0] == myBaseCall
|| w[0].endsWith ("/" + myBaseCall)
|| w[0].startsWith (myBaseCall + "/")
|| (w.size () > 1 && !dxBaseCall.isEmpty ()
&& (w[1] == dxBaseCall
|| w[1].endsWith ("/" + dxBaseCall)
|| w[1].startsWith (dxBaseCall + "/")))))
{
QString tt="";
if(w.length()>=3) tt=w[2];
if(w.size() > 2) tt=w[2];
bool ok;
i1=tt.toInt(&ok);
if (ok and i1>=-50 and i1<50)