mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-10 06:22:15 -05:00
Allow partial processing of UDP Reply messages for non-CQ/QRZ messages
This allows external programs to set up a QSO, for example to tail-end a QSO, but unlike double-clicking a non-CQ/QRZ decode in WSJT-X directly it will not enable auto Tx. This last constraint is to make fully automating WSJT-X using UDP messages impossible. It is expected that programs like JTAlert will, without change, allow users to set up a QSO with any station from the JTAlert UI although for non-CQ/QRZ decodes a QSO can only be started by pushing the "Enable Tx" button in WSJT-X. Thanks to Mike, W9MDB, for the patch that this change is based on, the implementation committed is considerably simpler than his proposed change. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8574 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
63658b3c1f
commit
39c7b11108
@ -6529,9 +6529,6 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||
return;
|
||||
}
|
||||
|
||||
if (message_text.contains (QRegularExpression {R"(^(CQ |CQDX |QRZ ))"}))
|
||||
{
|
||||
// a message we are willing to accept
|
||||
QString format_string {"%1 %2 %3 %4 %5 %6"};
|
||||
auto const& time_string = time.toString ("~" == mode || "&" == mode ? "hhmmss" : "hhmm");
|
||||
auto cqtext = format_string
|
||||
@ -6569,7 +6566,10 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||
}
|
||||
// find the linefeed at the end of the line
|
||||
position = ui->decodedTextBrowser->toPlainText().indexOf(QChar::LineFeed,position);
|
||||
if (message_text.contains (QRegularExpression {R"(^(CQ |CQDX |QRZ ))"})) {
|
||||
// a message we are willing to accept and auto reply to
|
||||
m_bDoubleClicked = true;
|
||||
}
|
||||
auto start = messages.left (position).lastIndexOf (QChar::LineFeed) + 1;
|
||||
DecodedText message {messages.mid (start, position - start), ("MSK144" == m_mode || "FT8" == m_mode) &&
|
||||
ui->cbVHFcontest->isChecked(), m_config.my_grid ()};
|
||||
@ -6580,12 +6580,7 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug () << "reply to CQ request ignored, decode not found:" << cqtext;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug () << "rejecting UDP request to reply as decode is not a CQ or QRZ";
|
||||
qDebug () << "process reply message ignored, decode not found:" << cqtext;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user