Added CQ as a directed command (directed to @ALLCALL) in the API

This commit is contained in:
Jordan Sherer 2020-04-05 11:49:34 -04:00
parent 2ccdd9423d
commit 39315e8d11
3 changed files with 32 additions and 3 deletions

View File

@ -4950,8 +4950,26 @@ void MainWindow::processDecodedLine(QByteArray t){
// this is a cq with a standard or compound call, ala "KN4CRD/P: @ALLCALL CQ CQ CQ" // this is a cq with a standard or compound call, ala "KN4CRD/P: @ALLCALL CQ CQ CQ"
cd.cqTimestamp = DriftingDateTime::currentDateTimeUtc(); cd.cqTimestamp = DriftingDateTime::currentDateTimeUtc();
// it is not processed elsewhere, so we need to just log it here. // convert CQ to a directed command and process...
logCallActivity(cd, true); cmd.from = cd.call;
cmd.to = "@ALLCALL";
cmd.cmd = " CQ";
cmd.snr = cd.snr;
cmd.bits = cd.bits;
cmd.grid = cd.grid;
cmd.dial = cd.dial;
cmd.offset = cd.offset;
cmd.utcTimestamp = cd.utcTimestamp;
cmd.tdrift = cd.tdrift;
cmd.submode = cd.submode;
cmd.text = decodedtext.message();
// TODO: check bits so we only auto respond to "finished" cqs
m_rxCommandQueue.append(cmd);
// since this is no longer processed here we omit logging it here.
// if we change this behavior, we'd change this back to logging here.
// logCallActivity(cd, true);
// notification for cq // notification for cq
tryNotify("cq"); tryNotify("cq");
@ -11035,7 +11053,7 @@ void MainWindow::processCommandActivity() {
// we're only responding to allcalls if we are participating in the allcall group // we're only responding to allcalls if we are participating in the allcall group
// but, don't avoid for heartbeats...those are technically allcalls but are processed differently // but, don't avoid for heartbeats...those are technically allcalls but are processed differently
if(isAllCall && m_config.avoid_allcall() && d.cmd != " HB" && d.cmd != " HEARTBEAT"){ if(isAllCall && m_config.avoid_allcall() && d.cmd != " CQ" && d.cmd != " HB" && d.cmd != " HEARTBEAT"){
continue; continue;
} }
@ -11419,6 +11437,12 @@ void MainWindow::processCommandActivity() {
continue; continue;
} }
// PROCESS CQ
else if (d.cmd == " CQ"){
qDebug() << "skipping incoming cq" << d.text;
continue;
}
// PROCESS MSG // PROCESS MSG
else if (d.cmd == " MSG" && !isAllCall){ else if (d.cmd == " MSG" && !isAllCall){

4
tcp.py
View File

@ -30,6 +30,10 @@ class Client(object):
if not typ: if not typ:
return return
if typ in ('RX.ACTIVITY',):
# skip
return
print('->', typ) print('->', typ)
if value: if value:

View File

@ -47,6 +47,7 @@ QMap<QString, int> directed_cmds = {
// ?*^&@ // ?*^&@
{" HEARTBEAT", -1 }, // this is my heartbeat (unused except for faux processing of HBs as directed commands) {" HEARTBEAT", -1 }, // this is my heartbeat (unused except for faux processing of HBs as directed commands)
{" HB", -1 }, // this is my heartbeat (unused except for faux processing of HBs as directed commands) {" HB", -1 }, // this is my heartbeat (unused except for faux processing of HBs as directed commands)
{" CQ", -1 }, // this is my cq (unused except for faux processing of CQs as directed commands)
{" SNR?", 0 }, // query snr {" SNR?", 0 }, // query snr
{"?", 0 }, // compat {"?", 0 }, // compat