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
This commit is contained in:
Edson W. R. Pereira 2013-04-17 12:54:16 +00:00
parent 40b8e11be6
commit 440cb2474a
2 changed files with 9 additions and 5 deletions

View File

@ -1805,6 +1805,12 @@ p, li { white-space: pre-wrap; }
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_4">
<property name="spacing">

View File

@ -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<QString,QString> 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