mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-08 17:04:41 -04:00
Improved automatic message handling
More consistent and accurate processing of compund callsigns including recognizing the user's call in both base and fully qualified form, extracting reports from special type one and type two compound call messages. Ensure that "CQ DX" message prefixes are recognized and processd correctly. The cycle of double clicking through a QSO has been enhanced to recognoize the standard messages correctly and use the correct next message. The automatic transmission button "Enable Tx" now does what it says and does not double as a stop transmit button. This allows the current transmission to complete even if the automatic transmission feature is disabled. In line with this the "stop sending after a 73 message is sent" feature turns off the automatic transmission enable at the start of the sending of a 73 message and also the next message is now set up as the CQ message automatically in this scenario. A 73 message is now either a standard message containing the word "73" or any free text message containing "73" (not necessarily as a distinct word"). git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5055 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+32
-17
@@ -2,15 +2,29 @@
|
||||
#include <QDebug>
|
||||
#include "decodedtext.h"
|
||||
|
||||
|
||||
|
||||
QString DecodedText::CQersCall()
|
||||
{
|
||||
// extract the CQer's call TODO: does this work with all call formats? What about 'CQ DX'?
|
||||
int s1 = 4 + _string.indexOf(" CQ ");
|
||||
int s2 = _string.indexOf(" ",s1);
|
||||
QString call = _string.mid(s1,s2-s1);
|
||||
return call;
|
||||
// extract the CQer's call TODO: does this work with all call formats?
|
||||
int s1;
|
||||
int position;
|
||||
if ((position = _string.indexOf (" CQ DX ")) >= 0)
|
||||
{
|
||||
s1 = 7 + position;
|
||||
}
|
||||
else if ((position = _string.indexOf (" CQ ")) >= 0)
|
||||
{
|
||||
s1 = 4 + position;
|
||||
}
|
||||
else if ((position = _string.indexOf (" DE ")) >= 0)
|
||||
{
|
||||
s1 = 4 + position;
|
||||
}
|
||||
else if ((position = _string.indexOf (" QRZ ")) >= 0)
|
||||
{
|
||||
s1 = 5 + position;
|
||||
}
|
||||
auto s2 = _string.indexOf (" ", s1);
|
||||
return _string.mid (s1, s2 - s1);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,21 +109,22 @@ bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /
|
||||
// get the first text word, usually the call
|
||||
QString DecodedText::call()
|
||||
{
|
||||
QString call = _string.mid(column_qsoText);
|
||||
int i = call.indexOf(" ");
|
||||
call = call.mid(0,i);
|
||||
return call;
|
||||
auto call = _string;
|
||||
call = call.replace (" CQ DX ", " CQ_DX ").mid (column_qsoText);
|
||||
int i = call.indexOf(" ");
|
||||
return call.mid(0,i);
|
||||
}
|
||||
|
||||
// get the second word, most likely the de call and the third word, most likely grid
|
||||
void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid)
|
||||
{
|
||||
QString msg=_string.mid(column_qsoText);
|
||||
int i1 = msg.indexOf(" ");
|
||||
call = msg.mid(i1+1);
|
||||
int i2 = call.indexOf(" ");
|
||||
grid = call.mid(i2+1,4);
|
||||
call = call.mid(0,i2);
|
||||
auto msg = _string;
|
||||
msg = msg.replace (" CQ DX ", " CQ_DX ").mid (column_qsoText);
|
||||
int i1 = msg.indexOf(" ");
|
||||
call = msg.mid(i1+1);
|
||||
int i2 = call.indexOf(" ");
|
||||
grid = call.mid(i2+1,4);
|
||||
call = call.mid(0,i2);
|
||||
}
|
||||
|
||||
int DecodedText::timeInSeconds()
|
||||
|
||||
Reference in New Issue
Block a user