From 8c8ddb533c35c33816a2110f96fbeafde7a3be25 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sat, 11 Aug 2018 10:31:28 -0400 Subject: [PATCH] Fixed issue with grid length. Fixed back-to-back CQs --- Configuration.cpp | 2 +- Configuration.ui | 39 +++++++++++++++++++++------------------ mainwindow.cpp | 15 +++++++-------- varicode.cpp | 4 ++-- 4 files changed, 31 insertions(+), 29 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 2819363..8690616 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -873,7 +873,7 @@ int Configuration::activity_aging() const void Configuration::set_location (QString const& grid_descriptor) { // change the dynamic grid - qDebug () << "Configuration::set_location - location:" << grid_descriptor; + // qDebug () << "Configuration::set_location - location:" << grid_descriptor; m_->dynamic_grid_ = grid_descriptor.trimmed (); } diff --git a/Configuration.ui b/Configuration.ui index bdd86f4..819e5d1 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -77,21 +77,10 @@ - Maidenhead locator (only the first four characters are required). + <html><head/><body><p>4-digit Maidenhead Locator</p></body></html> - - - - - - - - - - Check to allow grid changes from external programs - - - AutoGrid + + 4 @@ -2091,6 +2080,20 @@ for assessing propagation and system performance. + + + + + + Check to allow grid changes from external programs + + + Accept Dynamic Grid Requests + + + + + @@ -3161,12 +3164,12 @@ soundcard changes + + + + - - - - diff --git a/mainwindow.cpp b/mainwindow.cpp index a0350e5..e54e875 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -6231,15 +6231,15 @@ void MainWindow::checkBacon(){ void MainWindow::prepareBacon(){ QStringList lines; - QString call = m_config.my_callsign(); - QString grid = m_config.my_grid().left(4); + QString mycall = m_config.my_callsign(); + QString mygrid = m_config.my_grid().left(4); // FT8Call Style - lines.append(QString("%1: BEACON %2").arg(call).arg(grid)); + lines.append(QString("%1: BEACON %2").arg(mycall).arg(mygrid)); - bool shouldTransmitTwoBeacons = false; + bool shouldTransmitTwoBeacons = true; if(shouldTransmitTwoBeacons){ - lines.append(QString("%1: BEACON %2").arg(call).arg(grid)); + lines.append(QString("%1: BEACON %2").arg(mycall).arg(mygrid)); } // Queue the beacon @@ -6957,9 +6957,8 @@ void MainWindow::on_clearAction_triggered(QObject * sender){ } void MainWindow::on_cqMacroButton_clicked(){ - QString call = m_config.my_callsign(); - QString grid = m_config.my_grid().left(4); - QString text = QString("%1: CQCQCQ %2").arg(call).arg(grid).trimmed(); + QString mygrid = m_config.my_grid().left(4); + QString text = QString("CQCQCQ %1").arg(mygrid).trimmed(); addMessageText(text); } diff --git a/varicode.cpp b/varicode.cpp index baf38bd..d38cbca 100644 --- a/varicode.cpp +++ b/varicode.cpp @@ -85,9 +85,9 @@ QRegularExpression directed_re("^" + optional_pwr_pattern + optional_num_pattern); -QRegularExpression beacon_re(R"(^(?CQCQCQ|BEACON)(?:\s(?[A-R]{2}[0-9]{2}))?\b)"); +QRegularExpression beacon_re(R"(^\s*(?CQCQCQ|BEACON)(?:\s(?[A-R]{2}[0-9]{2}))?\b)"); -QRegularExpression compound_re("^[<]" + +QRegularExpression compound_re("^\\s*[<]" + callsign_pattern + "(?" + optional_grid_pattern +