From 834630e2d46a9128ba3a899e1a17c83b31010795 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 12 Mar 2021 23:28:33 +0000 Subject: [PATCH] Repair some QSO sequencing defects --- Decoder/decodedtext.cpp | 2 +- widgets/mainwindow.cpp | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Decoder/decodedtext.cpp b/Decoder/decodedtext.cpp index ccbf56621..621aeea18 100644 --- a/Decoder/decodedtext.cpp +++ b/Decoder/decodedtext.cpp @@ -23,7 +23,7 @@ DecodedText::DecodedText (QString const& the_string) , is_standard_ {false} { // discard appended AP info - clean_string_.replace (QRegularExpression {R"(^(.*)(?:(?:\?\s)?a[0-9].*)$)"}, "\\1"); + clean_string_.replace (QRegularExpression {R"(^(.*?)(?:\?\s)?a[0-9].*$)"}, "\\1"); // qDebug () << "DecodedText: the_string:" << the_string << "Nbsp pos:" << the_string.indexOf (QChar::Nbsp); if (message_.length() >= 1) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 0d15ae14c..201adfe22 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4984,7 +4984,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie auto const& word_3 = message_words.at (3); auto word_3_as_number = word_3.toInt (); if (("RRR" == word_3 - || word_3_as_number == 73 + || (word_3_as_number == 73 && ROGERS == m_QSOProgress) || "RR73" == word_3 || ("R" == word_3 && m_QSOProgress != REPORT))) { if(m_mode=="FT4" and "RR73" == word_3) m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc(); @@ -5013,11 +5013,31 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie m_ntx=4; ui->txrb4->setChecked(true); } - else + else if ((m_QSOProgress > CALLING && m_QSOProgress < ROGERS) + || word_3.contains (QRegularExpression {"^RR(?:R|73)$"})) { m_ntx=5; ui->txrb5->setChecked(true); } + else if (ROGERS == m_QSOProgress) + { + logQSOTimer.start(0); + m_ntx=6; + ui->txrb6->setChecked(true); + } + else + { + // just work them (again) + if (ui->tx1->isEnabled ()) { + m_ntx = 1; + m_QSOProgress = REPLYING; + ui->txrb1->setChecked (true); + } else { + m_ntx=2; + m_QSOProgress = REPORT; + ui->txrb2->setChecked (true); + } + } } if (m_QSOProgress >= ROGER_REPORT) {