Added spotting of messages directed to @JS8NET
This commit is contained in:
parent
08cf869125
commit
1629415dc1
@ -81,7 +81,26 @@ void SpotClient::enqueueSpot(QString callsign, QString grid, int frequency, int
|
||||
{"SNR", QVariant(snr)},
|
||||
});
|
||||
|
||||
// queue these...
|
||||
m_queue.enqueue(m.toJson());
|
||||
}
|
||||
|
||||
void SpotClient::enqueueCmd(QString cmd, QString from, QString to, QString relayPath, QString text, QString grid, QString extra, int frequency, int snr){
|
||||
auto m = Message("RX.DIRECTED", "", {
|
||||
{"BY", QVariant(QMap<QString, QVariant>{
|
||||
{"CALLSIGN", QVariant(m_call)},
|
||||
{"GRID", QVariant(m_grid)},
|
||||
})},
|
||||
{"CMD", QVariant(cmd)},
|
||||
{"FROM", QVariant(from)},
|
||||
{"TO", QVariant(to)},
|
||||
{"PATH", QVariant(relayPath)},
|
||||
{"TEXT", QVariant(text)},
|
||||
{"GRID", QVariant(grid)},
|
||||
{"EXTRA", QVariant(extra)},
|
||||
{"FREQ", QVariant(frequency)},
|
||||
{"SNR", QVariant(snr)},
|
||||
});
|
||||
|
||||
m_queue.enqueue(m.toJson());
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
void prepare();
|
||||
void setLocalStation(QString callsign, QString grid, QString info, QString version);
|
||||
void enqueueLocalSpot(QString callsign, QString grid, QString info, QString version);
|
||||
void enqueueCmd(QString cmd, QString from, QString to, QString relayPath, QString text, QString grid, QString extra, int frequency, int snr);
|
||||
void enqueueSpot(QString callsign, QString grid, int frequency, int snr);
|
||||
void sendRawSpot(QByteArray payload);
|
||||
|
||||
|
@ -4543,6 +4543,17 @@ void MainWindow::spotReport(int offset, int snr, QString callsign, QString grid)
|
||||
m_spotClient->enqueueSpot(callsign, grid, frequency, snr);
|
||||
}
|
||||
|
||||
void MainWindow::spotCmd(CommandDetail cmd){
|
||||
if(!m_config.spot_to_reporting_networks()) return;
|
||||
|
||||
QString cmdStr = cmd.cmd;
|
||||
if(!cmdStr.trimmed().isEmpty()){
|
||||
cmdStr = Varicode::lstrip(cmd.cmd);
|
||||
}
|
||||
|
||||
m_spotClient->enqueueCmd(cmdStr, cmd.from, cmd.to, cmd.relayPath, cmd.text, cmd.grid, cmd.extra, m_freqNominal + cmd.freq, cmd.snr);
|
||||
}
|
||||
|
||||
void MainWindow::pskLogReport(QString mode, int offset, int snr, QString callsign, QString grid){
|
||||
if(!m_config.spot_to_reporting_networks()) return;
|
||||
|
||||
@ -9971,6 +9982,11 @@ void MainWindow::processCommandActivity() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// PROCESS @JS8NET SPOTS FOR EVERYONE
|
||||
if (d.to == "@JS8NET"){
|
||||
spotCmd(d);
|
||||
}
|
||||
|
||||
// we're only responding to allcall, groupcalls, and our callsign at this point, so we'll end after logging the callsigns we've heard
|
||||
if (!isAllCall && !toMe && !isGroupCall) {
|
||||
continue;
|
||||
|
@ -926,6 +926,7 @@ private:
|
||||
void pskSetLocal ();
|
||||
void aprsSetLocal ();
|
||||
void spotReport(int offset, int snr, QString callsign, QString grid);
|
||||
void spotCmd(CommandDetail cmd);
|
||||
void pskLogReport(QString mode, int offset, int snr, QString callsign, QString grid);
|
||||
void aprsLogReport(int offset, int snr, QString callsign, QString grid);
|
||||
Radio::Frequency dialFrequency();
|
||||
|
Loading…
Reference in New Issue
Block a user