diff --git a/APRSISClient.cpp b/APRSISClient.cpp index 226fc65..f72646d 100644 --- a/APRSISClient.cpp +++ b/APRSISClient.cpp @@ -184,17 +184,16 @@ QPair APRSISClient::grid2aprs(QString grid){ }; } -void APRSISClient::enqueueSpot(QString theircall, QString grid, quint64 frequency, int snr){ +void APRSISClient::enqueueSpot(QString theircall, QString grid, QString comment){ if(m_localCall.isEmpty()) return; auto geo = APRSISClient::grid2aprs(grid); - auto spotFrame = QString("%1>%2,APRS,TCPIP*:=%3/%4nFT8CALL %5MHz %6dB\n"); + auto spotFrame = QString("%1>%2,APRS,TCPIP*:=%3/%4nFT8CALL %5\n"); spotFrame = spotFrame.arg(theircall); spotFrame = spotFrame.arg(m_localCall); spotFrame = spotFrame.arg(geo.first); spotFrame = spotFrame.arg(geo.second); - spotFrame = spotFrame.arg(Radio::frequency_MHz_string(frequency)); - spotFrame = spotFrame.arg(Varicode::formatSNR(snr)); + spotFrame = spotFrame.arg(comment.left(43)); enqueueRaw(spotFrame); } @@ -240,7 +239,7 @@ void APRSISClient::processQueue(bool disconnect){ } } - auto re = QRegExp("full|unavailable|busy"); + auto re = QRegExp("(full|unavailable|busy)"); auto line = QString(readLine()); if(line.toLower().indexOf(re) >= 0){ qDebug() << "APRSISClient Connection Busy:" << line; diff --git a/APRSISClient.h b/APRSISClient.h index ca1ebf4..1b6902f 100644 --- a/APRSISClient.h +++ b/APRSISClient.h @@ -21,7 +21,7 @@ public: m_localGrid = mygrid; } - void enqueueSpot(QString theircall, QString grid, quint64 frequency, int snr); + void enqueueSpot(QString theircall, QString grid, QString comment); void enqueueMessage(QString tocall, QString message); void enqueueThirdParty(QString theircall, QString payload); void enqueueRaw(QString aprsFrame); diff --git a/mainwindow.cpp b/mainwindow.cpp index 1d5ae8c..e8758b0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3887,7 +3887,11 @@ void MainWindow::aprsLogReport(int offset, int snr, QString callsign, QString gr return; } - m_aprsClient->enqueueSpot(Radio::base_callsign(callsign), grid, frequency, snr); + auto comment = QString("%1MHz %2dB").arg(Radio::frequency_MHz_string(frequency)).arg(Varicode::formatSNR(snr)); + if(callsign.contains("/")){ + comment = QString("%1 %2").arg(callsign).arg(comment); + } + m_aprsClient->enqueueSpot(Radio::base_callsign(callsign), grid, comment); } void MainWindow::killFile ()