From ddcc5a1774e8af8ce67ec345c82d04fa5e538293 Mon Sep 17 00:00:00 2001 From: "Edson W. R. Pereira" Date: Wed, 17 Apr 2013 12:54:16 +0000 Subject: [PATCH] Fixed bug in PSK Reporter when reporting positive values for SNR. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3191 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.ui | 6 ++++++ psk_reporter.cpp | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mainwindow.ui b/mainwindow.ui index 8c94e5f66..1f1ff5366 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1805,6 +1805,12 @@ p, li { white-space: pre-wrap; } 6 + + 2 + + + 2 + diff --git a/psk_reporter.cpp b/psk_reporter.cpp index a05ff51e2..9d2ec05e7 100644 --- a/psk_reporter.cpp +++ b/psk_reporter.cpp @@ -25,7 +25,7 @@ PSK_Reporter::PSK_Reporter(QObject *parent) : "800AFFFF0000768F" // 10. Tx Mode "8003FFFF0000768F" // 3. Tx Grid "800B00010000768F" // 11. Tx info src - "00960004"; // Tx time + "00960004"; // Report time qsrand(QDateTime::currentDateTime().toTime_t()); @@ -42,7 +42,7 @@ void PSK_Reporter::setLocalStation(QString call, QString gridSquare, QString pro m_rxCall = call; m_rxGrid = gridSquare; m_progId = programInfo; - reportTimer->start(1*60*1000); // 5 minutes; + reportTimer->start(5*60*1000); // 5 minutes; } void PSK_Reporter::addRemoteStation(QString call, QString grid, QString freq, QString mode, QString snr, QString time ) @@ -62,8 +62,6 @@ void PSK_Reporter::sendReport() if (m_spotQueue.isEmpty()) return; - qDebug() << m_rxCall << m_rxGrid << m_progId; - // Header QString header_h = m_header_h; header_h.replace("tttttttt", QString("%1").arg(QDateTime::currentDateTime().toTime_t(),8,16,QChar('0'))); @@ -84,7 +82,7 @@ void PSK_Reporter::sendReport() QHash spot = m_spotQueue.dequeue(); txInfoData_h += QString("%1").arg(spot["call"].length(),2,16,QChar('0')) + spot["call"].toUtf8().toHex(); txInfoData_h += QString("%1").arg(spot["freq"].toLongLong(),8,16,QChar('0')); - txInfoData_h += QString("%1").arg(spot["snr"].toInt(),1,16,QChar('0')).mid(14,2); + txInfoData_h += QString("%1").arg(spot["snr"].toInt(),8,16,QChar('0')).right(2); txInfoData_h += QString("%1").arg(spot["mode"].length(),2,16,QChar('0')) + spot["mode"].toUtf8().toHex(); txInfoData_h += QString("%1").arg(spot["grid"].length(),2,16,QChar('0')) + spot["grid"].toUtf8().toHex(); txInfoData_h += QString("%1").arg(1,2,16,QChar('0')); // REPORTER_SOURCE_AUTOMATIC