diff --git a/mainwindow.cpp b/mainwindow.cpp index dd6c5da..a356320 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -8971,6 +8971,10 @@ bool MainWindow::isAllCallIncluded(const QString &text){ return text.contains("ALLCALL"); } +bool MainWindow::isGroupCallIncluded(const QString &text){ + return text.contains("GROUPCALL"); +} + void MainWindow::processActivity(bool force) { if (!m_rxDirty && !force) { return; @@ -9261,6 +9265,8 @@ void MainWindow::processCommandActivity() { auto d = m_rxCommandQueue.dequeue(); bool isAllCall = isAllCallIncluded(d.to); + bool isGroupCall = isGroupCallIncluded(d.to); + bool isNear = abs(d.freq - currentFreqOffset()) <= 150; qDebug() << "try processing command" << d.from << d.to << d.cmd << d.freq << d.grid << d.extra; @@ -9288,8 +9294,8 @@ void MainWindow::processCommandActivity() { cd.utcTimestamp = d.utcTimestamp; logCallActivity(cd, true); - // we're only responding to allcall and our callsign at this point, so we'll end after logging the callsigns we've heard - if (!isAllCall && !toMe) { + // we're only responding to allcall, groupcalls near us, and our callsign at this point, so we'll end after logging the callsigns we've heard + if (!isAllCall && !toMe && !(isGroupCall && isNear)) { continue; } @@ -9298,12 +9304,6 @@ void MainWindow::processCommandActivity() { continue; } - // if this is an allcall, check to make sure we haven't replied to their allcall recently (in the past beacon interval) - // that way we never get spammed by allcalls at a higher frequency than what we would normally beacon - if (isAllCall && m_txAllcallCommandCache.contains(d.from) && m_txAllcallCommandCache[d.from]->secsTo(now) / 60 < m_config.beacon()) { - continue; - } - // display the command activity ActivityDetail ad = {}; ad.isLowConfidence = false; @@ -9378,6 +9378,12 @@ void MainWindow::processCommandActivity() { writeDirectedCommandToFile(d); } + // if this is an allcall, check to make sure we haven't replied to their allcall recently (in the past beacon interval) + // that way we never get spammed by allcalls at a higher frequency than what we would normally beacon + if (isAllCall && m_txAllcallCommandCache.contains(d.from) && m_txAllcallCommandCache[d.from]->secsTo(now) / 60 < m_config.beacon()) { + continue; + } + // and mark the offset as a directed offset so future free text is displayed // markOffsetDirected(ad.freq, isAllCall); diff --git a/mainwindow.h b/mainwindow.h index 848a479..11a88ca 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -890,6 +890,7 @@ private: void updateTxButtonDisplay(); bool isMyCallIncluded(QString const &text); bool isAllCallIncluded(QString const &text); + bool isGroupCallIncluded(const QString &text); QString callsignSelected(bool useInputText=false); bool isRecentOffset(int offset); void markOffsetRecent(int offset); diff --git a/varicode.cpp b/varicode.cpp index 17b0be5..7084f3a 100644 --- a/varicode.cpp +++ b/varicode.cpp @@ -173,8 +173,9 @@ quint16 nusergrid = nbasegrid + 10; quint16 nmaxgrid = (1<<15)-1; QMap basecalls = { - { "<....>", nbasecall + 1 }, // incomplete callsign - { "ALLCALL", nbasecall + 2 }, + { "<....>", nbasecall + 1 }, // incomplete callsign + { "ALLCALL", nbasecall + 2 }, + { "GROUPCALL", nbasecall + 3 }, }; QMap cqs = {