mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-31 15:07:12 -04:00
Update packet mode to follow current spec
This commit is contained in:
parent
c7eca5e92e
commit
967d9e1131
@ -128,17 +128,13 @@ public:
|
|||||||
std::copy(source_.begin(), source_.end(), rit);
|
std::copy(source_.begin(), source_.end(), rit);
|
||||||
|
|
||||||
lsf[12] = can_ >> 1;
|
lsf[12] = can_ >> 1;
|
||||||
lsf[13] = (streamElsePacket ? 5 : 4) | ((can_ & 1) << 7);
|
lsf[13] = (streamElsePacket ? 5 : 2) | ((can_ & 1) << 7);
|
||||||
|
|
||||||
if (gnss_on_)
|
if (gnss_on_)
|
||||||
{
|
{
|
||||||
lsf[13] |= (1<<5);
|
lsf[13] |= (1<<5);
|
||||||
std::copy(gnss_.begin(), gnss_.end(), &lsf[14]);
|
std::copy(gnss_.begin(), gnss_.end(), &lsf[14]);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
lsf[13] |= (3<<5);
|
|
||||||
}
|
|
||||||
|
|
||||||
crc.reset();
|
crc.reset();
|
||||||
|
|
||||||
|
@ -251,10 +251,10 @@ void M17DemodProcessor::decode_type(uint16_t type)
|
|||||||
m_typeInfo += "UNK";
|
m_typeInfo += "UNK";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
m_typeInfo += "RAW";
|
m_typeInfo += "DAT";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
m_typeInfo += "ENC";
|
m_typeInfo += "UNK";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
m_typeInfo += "UNK";
|
m_typeInfo += "UNK";
|
||||||
|
@ -60,6 +60,7 @@ bool M17ModProcessor::handleMessage(const Message& cmd)
|
|||||||
const MsgSendSMS& notif = (const MsgSendSMS&) cmd;
|
const MsgSendSMS& notif = (const MsgSendSMS&) cmd;
|
||||||
QByteArray packetBytes = notif.getSMSText().toUtf8();
|
QByteArray packetBytes = notif.getSMSText().toUtf8();
|
||||||
packetBytes.prepend(0x05); // SMS standard type
|
packetBytes.prepend(0x05); // SMS standard type
|
||||||
|
packetBytes.append('\0'); // SMS should be null terminated
|
||||||
packetBytes.truncate(798); // Maximum packet size is 798 payload + 2 bytes CRC = 800 bytes (32*25)
|
packetBytes.truncate(798); // Maximum packet size is 798 payload + 2 bytes CRC = 800 bytes (32*25)
|
||||||
processPacket(notif.getSourceCall(), notif.getDestCall(), notif.getCAN(), packetBytes);
|
processPacket(notif.getSourceCall(), notif.getDestCall(), notif.getCAN(), packetBytes);
|
||||||
// test(notif.getSourceCall(), notif.getDestCall());
|
// test(notif.getSourceCall(), notif.getDestCall());
|
||||||
|
Loading…
Reference in New Issue
Block a user