Update packet mode to follow current spec

pull/1892/head
Jon Beniston 2023-11-15 15:38:01 +00:00
rodzic c7eca5e92e
commit 967d9e1131
3 zmienionych plików z 4 dodań i 7 usunięć

Wyświetl plik

@ -128,17 +128,13 @@ public:
std::copy(source_.begin(), source_.end(), rit);
lsf[12] = can_ >> 1;
lsf[13] = (streamElsePacket ? 5 : 4) | ((can_ & 1) << 7);
lsf[13] = (streamElsePacket ? 5 : 2) | ((can_ & 1) << 7);
if (gnss_on_)
{
lsf[13] |= (1<<5);
std::copy(gnss_.begin(), gnss_.end(), &lsf[14]);
}
else
{
lsf[13] |= (3<<5);
}
crc.reset();

Wyświetl plik

@ -251,10 +251,10 @@ void M17DemodProcessor::decode_type(uint16_t type)
m_typeInfo += "UNK";
break;
case 1:
m_typeInfo += "RAW";
m_typeInfo += "DAT";
break;
case 2:
m_typeInfo += "ENC";
m_typeInfo += "UNK";
break;
case 3:
m_typeInfo += "UNK";

Wyświetl plik

@ -60,6 +60,7 @@ bool M17ModProcessor::handleMessage(const Message& cmd)
const MsgSendSMS& notif = (const MsgSendSMS&) cmd;
QByteArray packetBytes = notif.getSMSText().toUtf8();
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)
processPacket(notif.getSourceCall(), notif.getDestCall(), notif.getCAN(), packetBytes);
// test(notif.getSourceCall(), notif.getDestCall());