From 967d9e11316f89bf4eedc186d273a7a603ad1443 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 15 Nov 2023 15:38:01 +0000 Subject: [PATCH 1/2] Update packet mode to follow current spec --- modemm17/M17Modulator.h | 6 +----- plugins/channelrx/demodm17/m17demodprocessor.cpp | 4 ++-- plugins/channeltx/modm17/m17modprocessor.cpp | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modemm17/M17Modulator.h b/modemm17/M17Modulator.h index 4e6d8df9a0..24aa788d56 100644 --- a/modemm17/M17Modulator.h +++ b/modemm17/M17Modulator.h @@ -128,17 +128,13 @@ struct MODEMM17_API M17Modulator 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(); diff --git a/plugins/channelrx/demodm17/m17demodprocessor.cpp b/plugins/channelrx/demodm17/m17demodprocessor.cpp index 8e437d29e0..39731c27c4 100644 --- a/plugins/channelrx/demodm17/m17demodprocessor.cpp +++ b/plugins/channelrx/demodm17/m17demodprocessor.cpp @@ -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"; diff --git a/plugins/channeltx/modm17/m17modprocessor.cpp b/plugins/channeltx/modm17/m17modprocessor.cpp index cdce49c9d5..bd200adcff 100644 --- a/plugins/channeltx/modm17/m17modprocessor.cpp +++ b/plugins/channeltx/modm17/m17modprocessor.cpp @@ -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()); From 5f0d2aaf21bc2b67f2f1feb8576c29865a0e0321 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 15 Nov 2023 16:18:28 +0000 Subject: [PATCH 2/2] Add included needed for Mac build --- sdrgui/gui/mdiutils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sdrgui/gui/mdiutils.cpp b/sdrgui/gui/mdiutils.cpp index 46918f2b26..85031fc070 100644 --- a/sdrgui/gui/mdiutils.cpp +++ b/sdrgui/gui/mdiutils.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "mdiutils.h"