mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 14:18:38 -05:00
Allow for -0.0 DT value when matching UDP reply to CQ requests
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6236 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
b33f91f967
commit
4cfefe8893
@ -4545,7 +4545,8 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
|||||||
if (decode_parts.contains ("CQ") || decode_parts.contains ("QRZ"))
|
if (decode_parts.contains ("CQ") || decode_parts.contains ("QRZ"))
|
||||||
{
|
{
|
||||||
// a message we are willing to accept
|
// a message we are willing to accept
|
||||||
auto cqtext = QString {"%1 %2 %3 %4 %5 %6"}.arg (time.toString ("hhmm"))
|
QString format_string {"%1 %2 %3 %4 %5 %6"};
|
||||||
|
auto cqtext = format_string.arg (time.toString ("hhmm"))
|
||||||
.arg (snr, 3)
|
.arg (snr, 3)
|
||||||
.arg (delta_time, 4, 'f', 1)
|
.arg (delta_time, 4, 'f', 1)
|
||||||
.arg (delta_frequency, 4)
|
.arg (delta_frequency, 4)
|
||||||
@ -4553,6 +4554,16 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
|||||||
.arg (message_text);
|
.arg (message_text);
|
||||||
auto messages = ui->decodedTextBrowser->toPlainText ();
|
auto messages = ui->decodedTextBrowser->toPlainText ();
|
||||||
auto position = messages.lastIndexOf (cqtext);
|
auto position = messages.lastIndexOf (cqtext);
|
||||||
|
if (position < 0)
|
||||||
|
{
|
||||||
|
// try again with with -0.0 delta time
|
||||||
|
position = messages.lastIndexOf (format_string.arg (time.toString ("hhmm"))
|
||||||
|
.arg (snr, 3)
|
||||||
|
.arg ('-' + QString::number (delta_time, 'f', 1), 4)
|
||||||
|
.arg (delta_frequency, 4)
|
||||||
|
.arg (mode)
|
||||||
|
.arg (message_text));
|
||||||
|
}
|
||||||
if (position >= 0)
|
if (position >= 0)
|
||||||
{
|
{
|
||||||
if (m_config.udpWindowToFront ())
|
if (m_config.udpWindowToFront ())
|
||||||
|
Loading…
Reference in New Issue
Block a user