mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-23 04:28:36 -04:00
Allow recognition of "CQ G DB5KN JO31" and similar as standard messages.
This commit is contained in:
parent
8379fa86eb
commit
06b4a8f664
@ -65,7 +65,7 @@ QStringList DecodedText::messageWords () const
|
||||
|
||||
QString DecodedText::CQersCall() const
|
||||
{
|
||||
QRegularExpression callsign_re {R"(^(CQ|DE|QRZ)(\s?DX|\s([A-Z]{2,4}|\d{3}))?\s(?<callsign>[A-Z0-9/]{2,})(\s[A-R]{2}[0-9]{2})?)"};
|
||||
QRegularExpression callsign_re {R"(^(CQ|DE|QRZ)(\s?DX|\s([A-Z]{1,4}|\d{3}))?\s(?<callsign>[A-Z0-9/]{2,})(\s[A-R]{2}[0-9]{2})?)"};
|
||||
return callsign_re.match (message_).captured ("callsign");
|
||||
}
|
||||
|
||||
@ -167,9 +167,8 @@ void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) const
|
||||
call = match.captured ("word2");
|
||||
grid = match.captured ("word3");
|
||||
if ("R" == grid) grid = match.captured ("word4");
|
||||
if(match.captured("word1")=="CQ" and call.length()>=3 and call.length()<=4
|
||||
and !call.contains(QRegExp("[0-9]"))) {
|
||||
//Second word has length 3 or 4 and contains no digits
|
||||
if(match.captured("word1")=="CQ" and call.length()<=4 and !call.contains(QRegExp("[0-9]"))) {
|
||||
//Second word has length 1-4 and contains no digits
|
||||
call = match.captured ("word3");
|
||||
grid = match.captured ("word4");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user