Added RX.ACTIVITY and STATION.STATUS messages to network
This commit is contained in:
parent
575f6cc0e8
commit
0a658c706c
@ -4564,8 +4564,6 @@ void MainWindow::decodeBusy(bool b) //decodeBusy()
|
|||||||
ui->actionOpen->setEnabled(!b);
|
ui->actionOpen->setEnabled(!b);
|
||||||
ui->actionOpen_next_in_directory->setEnabled(!b);
|
ui->actionOpen_next_in_directory->setEnabled(!b);
|
||||||
ui->actionDecode_remaining_files_in_directory->setEnabled(!b);
|
ui->actionDecode_remaining_files_in_directory->setEnabled(!b);
|
||||||
|
|
||||||
statusUpdate ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10210,6 +10208,7 @@ void MainWindow::callsignSelectedChanged(QString /*old*/, QString selectedCall){
|
|||||||
// immediately update the display);
|
// immediately update the display);
|
||||||
updateButtonDisplay();
|
updateButtonDisplay();
|
||||||
updateTextDisplay();
|
updateTextDisplay();
|
||||||
|
statusChanged();
|
||||||
|
|
||||||
m_prevSelectedCallsign = selectedCall;
|
m_prevSelectedCallsign = selectedCall;
|
||||||
}
|
}
|
||||||
@ -10401,6 +10400,16 @@ void MainWindow::processRxActivity() {
|
|||||||
while (!m_rxActivityQueue.isEmpty()) {
|
while (!m_rxActivityQueue.isEmpty()) {
|
||||||
ActivityDetail d = m_rxActivityQueue.dequeue();
|
ActivityDetail d = m_rxActivityQueue.dequeue();
|
||||||
|
|
||||||
|
if(canSendNetworkMessage()){
|
||||||
|
sendNetworkMessage("RX.ACTIVITY", d.text, {
|
||||||
|
{"FREQ", QVariant(d.freq)},
|
||||||
|
{"SNR", QVariant(d.snr)},
|
||||||
|
{"SPEED", QVariant(d.submode)},
|
||||||
|
{"TDRIFT", QVariant(d.tdrift)},
|
||||||
|
{"UTC", QVariant(d.utcTimestamp.toMSecsSinceEpoch())}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
observeTimeDeltaForAverage(d.tdrift);
|
observeTimeDeltaForAverage(d.tdrift);
|
||||||
|
|
||||||
// use the actual frequency and check its delta from our current frequency
|
// use the actual frequency and check its delta from our current frequency
|
||||||
@ -10918,6 +10927,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
displayTextForFreq(ad.text, ad.freq, ad.utcTimestamp, false, true, false);
|
displayTextForFreq(ad.text, ad.freq, ad.utcTimestamp, false, true, false);
|
||||||
|
|
||||||
// and send it to the network in case we want to interact with it from an external app...
|
// and send it to the network in case we want to interact with it from an external app...
|
||||||
|
if(canSendNetworkMessage()){
|
||||||
sendNetworkMessage("RX.DIRECTED", ad.text, {
|
sendNetworkMessage("RX.DIRECTED", ad.text, {
|
||||||
{"FROM", QVariant(d.from)},
|
{"FROM", QVariant(d.from)},
|
||||||
{"TO", QVariant(d.to)},
|
{"TO", QVariant(d.to)},
|
||||||
@ -10927,8 +10937,11 @@ void MainWindow::processCommandActivity() {
|
|||||||
{"TEXT", QVariant(d.text)},
|
{"TEXT", QVariant(d.text)},
|
||||||
{"FREQ", QVariant(ad.freq)},
|
{"FREQ", QVariant(ad.freq)},
|
||||||
{"SNR", QVariant(ad.snr)},
|
{"SNR", QVariant(ad.snr)},
|
||||||
|
{"SPEED", QVariant(ad.submode)},
|
||||||
|
{"TDRIFT", QVariant(ad.tdrift)},
|
||||||
{"UTC", QVariant(ad.utcTimestamp.toMSecsSinceEpoch())}
|
{"UTC", QVariant(ad.utcTimestamp.toMSecsSinceEpoch())}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(!isAllCall){
|
if(!isAllCall){
|
||||||
// if we've received a message to be displayed, we should bump the repeat buttons...
|
// if we've received a message to be displayed, we should bump the repeat buttons...
|
||||||
@ -11656,6 +11669,7 @@ void MainWindow::processSpots() {
|
|||||||
spotReport(d.submode, d.freq, d.snr, d.call, d.grid);
|
spotReport(d.submode, d.freq, d.snr, d.call, d.grid);
|
||||||
pskLogReport("JS8", d.freq, d.snr, d.call, d.grid);
|
pskLogReport("JS8", d.freq, d.snr, d.call, d.grid);
|
||||||
|
|
||||||
|
if(canSendNetworkMessage()){
|
||||||
sendNetworkMessage("RX.SPOT", "", {
|
sendNetworkMessage("RX.SPOT", "", {
|
||||||
{"DIAL", QVariant(dial)},
|
{"DIAL", QVariant(dial)},
|
||||||
{"OFFSET", QVariant(d.freq)},
|
{"OFFSET", QVariant(d.freq)},
|
||||||
@ -11664,6 +11678,7 @@ void MainWindow::processSpots() {
|
|||||||
{"GRID", QVariant(d.grid)},
|
{"GRID", QVariant(d.grid)},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::processTxQueue(){
|
void MainWindow::processTxQueue(){
|
||||||
@ -12704,6 +12719,10 @@ void MainWindow::networkMessage(Message const &message)
|
|||||||
qDebug() << "Unable to process networkMessage:" << type;
|
qDebug() << "Unable to process networkMessage:" << type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MainWindow::canSendNetworkMessage(){
|
||||||
|
return m_config.udpEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::sendNetworkMessage(QString const &type, QString const &message){
|
void MainWindow::sendNetworkMessage(QString const &type, QString const &message){
|
||||||
if(!m_config.udpEnabled()){
|
if(!m_config.udpEnabled()){
|
||||||
return;
|
return;
|
||||||
@ -12965,8 +12984,16 @@ void MainWindow::on_cbCQTx_toggled(bool b)
|
|||||||
setXIT (ui->TxFreqSpinBox->value ());
|
setXIT (ui->TxFreqSpinBox->value ());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::statusUpdate () const
|
void MainWindow::statusUpdate ()
|
||||||
{
|
{
|
||||||
|
if(canSendNetworkMessage()){
|
||||||
|
sendNetworkMessage("STATION.STATUS", "", {
|
||||||
|
{"DIAL", QVariant(dialFrequency())},
|
||||||
|
{"OFFSET", QVariant(currentFreqOffset())},
|
||||||
|
{"SPEED", QVariant(m_nSubMode)},
|
||||||
|
{"SELECTED", QVariant(callsignSelected())},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::childEvent (QChildEvent * e)
|
void MainWindow::childEvent (QChildEvent * e)
|
||||||
|
@ -404,6 +404,7 @@ private slots:
|
|||||||
void emitPTT(bool on);
|
void emitPTT(bool on);
|
||||||
void emitTones();
|
void emitTones();
|
||||||
void networkMessage(Message const &message);
|
void networkMessage(Message const &message);
|
||||||
|
bool canSendNetworkMessage();
|
||||||
void sendNetworkMessage(QString const &type, QString const &message);
|
void sendNetworkMessage(QString const &type, QString const &message);
|
||||||
void sendNetworkMessage(QString const &type, QString const &message, const QMap<QString, QVariant> ¶ms);
|
void sendNetworkMessage(QString const &type, QString const &message, const QMap<QString, QVariant> ¶ms);
|
||||||
void networkError (QString const&);
|
void networkError (QString const&);
|
||||||
@ -1029,7 +1030,7 @@ private:
|
|||||||
void resetHeartbeatTimer(bool stop);
|
void resetHeartbeatTimer(bool stop);
|
||||||
void subProcessFailed (QString program, QStringList args, int exitCode, int status, QString errorString);
|
void subProcessFailed (QString program, QStringList args, int exitCode, int status, QString errorString);
|
||||||
void subProcessError (QString program, QStringList arguments, int errorCode, QString errorString);
|
void subProcessError (QString program, QStringList arguments, int errorCode, QString errorString);
|
||||||
void statusUpdate () const;
|
void statusUpdate ();
|
||||||
void update_watchdog_label ();
|
void update_watchdog_label ();
|
||||||
void on_the_minute ();
|
void on_the_minute ();
|
||||||
void tryBandHop();
|
void tryBandHop();
|
||||||
|
Loading…
Reference in New Issue
Block a user