Browse Source

Update packet mode to follow current spec

chirpmodem-v8.0.0
Jon Beniston 3 years ago
parent
commit
967d9e1131
  1. 6
      modemm17/M17Modulator.h
  2. 4
      plugins/channelrx/demodm17/m17demodprocessor.cpp
  3. 1
      plugins/channeltx/modm17/m17modprocessor.cpp

6
modemm17/M17Modulator.h

@ -128,17 +128,13 @@ public: @@ -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();

4
plugins/channelrx/demodm17/m17demodprocessor.cpp

@ -251,10 +251,10 @@ void M17DemodProcessor::decode_type(uint16_t type) @@ -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";

1
plugins/channeltx/modm17/m17modprocessor.cpp

@ -60,6 +60,7 @@ bool M17ModProcessor::handleMessage(const Message& cmd) @@ -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());

Loading…
Cancel
Save