GROUPCALL easter egg
This commit is contained in:
parent
4df77ac774
commit
1f210bba63
@ -8971,6 +8971,10 @@ bool MainWindow::isAllCallIncluded(const QString &text){
|
|||||||
return text.contains("ALLCALL");
|
return text.contains("ALLCALL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MainWindow::isGroupCallIncluded(const QString &text){
|
||||||
|
return text.contains("GROUPCALL");
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::processActivity(bool force) {
|
void MainWindow::processActivity(bool force) {
|
||||||
if (!m_rxDirty && !force) {
|
if (!m_rxDirty && !force) {
|
||||||
return;
|
return;
|
||||||
@ -9261,6 +9265,8 @@ void MainWindow::processCommandActivity() {
|
|||||||
auto d = m_rxCommandQueue.dequeue();
|
auto d = m_rxCommandQueue.dequeue();
|
||||||
|
|
||||||
bool isAllCall = isAllCallIncluded(d.to);
|
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;
|
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;
|
cd.utcTimestamp = d.utcTimestamp;
|
||||||
logCallActivity(cd, true);
|
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
|
// 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) {
|
if (!isAllCall && !toMe && !(isGroupCall && isNear)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9298,12 +9304,6 @@ void MainWindow::processCommandActivity() {
|
|||||||
continue;
|
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
|
// display the command activity
|
||||||
ActivityDetail ad = {};
|
ActivityDetail ad = {};
|
||||||
ad.isLowConfidence = false;
|
ad.isLowConfidence = false;
|
||||||
@ -9378,6 +9378,12 @@ void MainWindow::processCommandActivity() {
|
|||||||
writeDirectedCommandToFile(d);
|
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
|
// and mark the offset as a directed offset so future free text is displayed
|
||||||
// markOffsetDirected(ad.freq, isAllCall);
|
// markOffsetDirected(ad.freq, isAllCall);
|
||||||
|
|
||||||
|
@ -890,6 +890,7 @@ private:
|
|||||||
void updateTxButtonDisplay();
|
void updateTxButtonDisplay();
|
||||||
bool isMyCallIncluded(QString const &text);
|
bool isMyCallIncluded(QString const &text);
|
||||||
bool isAllCallIncluded(QString const &text);
|
bool isAllCallIncluded(QString const &text);
|
||||||
|
bool isGroupCallIncluded(const QString &text);
|
||||||
QString callsignSelected(bool useInputText=false);
|
QString callsignSelected(bool useInputText=false);
|
||||||
bool isRecentOffset(int offset);
|
bool isRecentOffset(int offset);
|
||||||
void markOffsetRecent(int offset);
|
void markOffsetRecent(int offset);
|
||||||
|
@ -173,8 +173,9 @@ quint16 nusergrid = nbasegrid + 10;
|
|||||||
quint16 nmaxgrid = (1<<15)-1;
|
quint16 nmaxgrid = (1<<15)-1;
|
||||||
|
|
||||||
QMap<QString, quint32> basecalls = {
|
QMap<QString, quint32> basecalls = {
|
||||||
{ "<....>", nbasecall + 1 }, // incomplete callsign
|
{ "<....>", nbasecall + 1 }, // incomplete callsign
|
||||||
{ "ALLCALL", nbasecall + 2 },
|
{ "ALLCALL", nbasecall + 2 },
|
||||||
|
{ "GROUPCALL", nbasecall + 3 },
|
||||||
};
|
};
|
||||||
|
|
||||||
QMap<quint32, QString> cqs = {
|
QMap<quint32, QString> cqs = {
|
||||||
|
Loading…
Reference in New Issue
Block a user