mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-19 22:28:54 -04:00
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:
+9
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user