mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
Fix gcc warnings
This commit is contained in:
parent
72602a28e4
commit
feecd02631
@ -145,17 +145,13 @@ bool PagerDemod::handleMessage(const Message& cmd)
|
|||||||
// Forward via UDP
|
// Forward via UDP
|
||||||
if (m_settings.m_udpEnabled)
|
if (m_settings.m_udpEnabled)
|
||||||
{
|
{
|
||||||
QString message = QString("%1%2%3%4%5%6%7%8%9").arg(
|
QByteArray message;
|
||||||
report.getDateTime().toString(),
|
message.append(report.getDateTime().toString().toLatin1());
|
||||||
'\0',
|
message.append(QString::number(report.getAddress()).toLatin1());
|
||||||
QString::number(report.getAddress()),
|
message.append(QString::number(report.getFunctionBits()).toLatin1());
|
||||||
'\0',
|
message.append(report.getAlphaMessage().toLatin1());
|
||||||
QString::number(report.getFunctionBits()),
|
message.append(report.getNumericMessage().toLatin1());
|
||||||
'\0',
|
m_udpSocket.writeDatagram(message.data(), message.size(),
|
||||||
report.getAlphaMessage(),
|
|
||||||
'\0',
|
|
||||||
report.getNumericMessage());
|
|
||||||
m_udpSocket.writeDatagram(message.toLatin1(), message.size(),
|
|
||||||
QHostAddress(m_settings.m_udpAddress), m_settings.m_udpPort);
|
QHostAddress(m_settings.m_udpAddress), m_settings.m_udpPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,6 @@ quint32 PagerDemodSink::reverse(quint32 x)
|
|||||||
quint32 PagerDemodSink::bchEncode(const quint32 cw)
|
quint32 PagerDemodSink::bchEncode(const quint32 cw)
|
||||||
{
|
{
|
||||||
quint32 bit = 0;
|
quint32 bit = 0;
|
||||||
quint32 parity = 0;
|
|
||||||
quint32 localCW = cw & 0xFFFFF800; // Mask off BCH parity and even parity bits
|
quint32 localCW = cw & 0xFFFFF800; // Mask off BCH parity and even parity bits
|
||||||
quint32 cwE = localCW;
|
quint32 cwE = localCW;
|
||||||
|
|
||||||
@ -285,7 +284,6 @@ void PagerDemodSink::decodeBatch()
|
|||||||
else if (addressCodeWord)
|
else if (addressCodeWord)
|
||||||
{
|
{
|
||||||
// Address
|
// Address
|
||||||
int checkBits = (m_codeWords[i] >> 1) & 0x3f;
|
|
||||||
m_functionBits = (m_codeWords[i] >> 11) & 0x3;
|
m_functionBits = (m_codeWords[i] >> 11) & 0x3;
|
||||||
int addressBits = (m_codeWords[i] >> 13) & 0x3ffff;
|
int addressBits = (m_codeWords[i] >> 13) & 0x3ffff;
|
||||||
m_address = (addressBits << 3) | frame;
|
m_address = (addressBits << 3) | frame;
|
||||||
@ -300,7 +298,6 @@ void PagerDemodSink::decodeBatch()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Message - decode as both numeric and ASCII - not all operators use functionBits to indidcate encoding
|
// Message - decode as both numeric and ASCII - not all operators use functionBits to indidcate encoding
|
||||||
int checkBits = (m_codeWords[i] >> 1) & 0x3f;
|
|
||||||
int messageBits = (m_codeWords[i] >> 11) & 0xfffff;
|
int messageBits = (m_codeWords[i] >> 11) & 0xfffff;
|
||||||
if (parityError) {
|
if (parityError) {
|
||||||
m_parityErrors++;
|
m_parityErrors++;
|
||||||
@ -441,8 +438,8 @@ void PagerDemodSink::processOneSample(Complex &ci)
|
|||||||
else if (popcount(m_bits ^ PAGERDEMOD_POCSAG_SYNCCODE_INV) >= 29)
|
else if (popcount(m_bits ^ PAGERDEMOD_POCSAG_SYNCCODE_INV) >= 29)
|
||||||
{
|
{
|
||||||
quint32 correctedCW;
|
quint32 correctedCW;
|
||||||
|
if (bchDecode(~m_bits, correctedCW) && (correctedCW == PAGERDEMOD_POCSAG_SYNCCODE))
|
||||||
{
|
{
|
||||||
qDebug() << "Corrected inverted sync codeword";
|
|
||||||
m_gotSOP = true;
|
m_gotSOP = true;
|
||||||
m_inverted = true;
|
m_inverted = true;
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,10 @@ Adjusts the expected frequency deviation in 0.1 kHz steps from 1 to 6 kHz. POCSA
|
|||||||
|
|
||||||
<h3>6: Mod - Modulation</h3>
|
<h3>6: Mod - Modulation</h3>
|
||||||
|
|
||||||
Species the pager modulation. Currently only POCSAG is supported.
|
Specifies the pager modulation. Currently only POCSAG is supported.
|
||||||
|
|
||||||
POCSAG uses FSK with 4.5kHz frequency shift, at 512, 1200 or 2400 baud.
|
POCSAG uses FSK with 4.5kHz frequency shift, at 512, 1200 or 2400 baud.
|
||||||
High frequency is typically 0, with low 1, but occasionaly this appears to be reversed, so the demodulator supports either.
|
High frequency is typically 0, with low 1, but occasionally this appears to be reversed, so the demodulator supports either.
|
||||||
Data is framed as specified in ITU-R M.584-2: https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.584-2-199711-I!!PDF-E.pdf
|
Data is framed as specified in ITU-R M.584-2: https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.584-2-199711-I!!PDF-E.pdf
|
||||||
|
|
||||||
<h3>7: Baud</h3>
|
<h3>7: Baud</h3>
|
||||||
@ -66,7 +66,7 @@ Pressing this button clears all messages from the table.
|
|||||||
|
|
||||||
When checked, received messages are forwarded to the specified UDP address (12) and port (13).
|
When checked, received messages are forwarded to the specified UDP address (12) and port (13).
|
||||||
|
|
||||||
The messages are forwarded as null termiated ASCII strings, in the format: data time address function alpha numeric
|
The messages are forwarded as null terminated ASCII strings, in the format: data time address function alpha numeric
|
||||||
|
|
||||||
<h3>12: UDP address</h3>
|
<h3>12: UDP address</h3>
|
||||||
|
|
||||||
@ -92,4 +92,4 @@ The received messages table displays each pager message received.
|
|||||||
* Even PE - Number of even parity errors detected in the code words of the message.
|
* Even PE - Number of even parity errors detected in the code words of the message.
|
||||||
* BCH PE - Number of uncorrectable BCH parity errors detected in the code words of the message.
|
* BCH PE - Number of uncorrectable BCH parity errors detected in the code words of the message.
|
||||||
|
|
||||||
Right clicking on the table header allows you to select which columns to show. The columns can be reorderd by left clicking and dragging the column header. Right clicking on an item in the table allows you to copy the value to the clipboard.
|
Right clicking on the table header allows you to select which columns to show. The columns can be reordered by left clicking and dragging the column header. Right clicking on an item in the table allows you to copy the value to the clipboard.
|
||||||
|
Loading…
Reference in New Issue
Block a user