From 4178abe24b84f3cd91385d600c41dbe37cc60ec0 Mon Sep 17 00:00:00 2001 From: srcejon Date: Fri, 17 Nov 2023 13:41:35 +0000 Subject: [PATCH] Fix M17 packet type decoding. --- plugins/channelrx/demodm17/m17demodgui.ui | 2 +- plugins/channelrx/demodm17/m17demodprocessor.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/channelrx/demodm17/m17demodgui.ui b/plugins/channelrx/demodm17/m17demodgui.ui index cb47bcac0..6f1c551cb 100644 --- a/plugins/channelrx/demodm17/m17demodgui.ui +++ b/plugins/channelrx/demodm17/m17demodgui.ui @@ -921,7 +921,7 @@ - Baud rate: 2.4k: NXDN48, dPMR 4.8k: DMR, D-Star, YSF, NXDN96 + Baud rate diff --git a/plugins/channelrx/demodm17/m17demodprocessor.cpp b/plugins/channelrx/demodm17/m17demodprocessor.cpp index 39731c27c..2f6d42e16 100644 --- a/plugins/channelrx/demodm17/m17demodprocessor.cpp +++ b/plugins/channelrx/demodm17/m17demodprocessor.cpp @@ -195,9 +195,9 @@ bool M17DemodProcessor::decode_lsf(modemm17::M17FrameDecoder::lsf_buffer_t const m_currentPacket.clear(); m_packetFrameCounter = 0; - if (!lsf[111]) // LSF type bit 0 + if (!(lsf[13] & 1)) // LSF type bit 0 { - uint8_t packet_type = (lsf[109] << 1) | lsf[110]; + uint8_t packet_type = (lsf[13] >> 1) & 0x3; switch (packet_type) { @@ -254,7 +254,7 @@ void M17DemodProcessor::decode_type(uint16_t type) m_typeInfo += "DAT"; break; case 2: - m_typeInfo += "UNK"; + m_typeInfo += "ENC"; // Encapsulated passes LSF up stack along with data break; case 3: m_typeInfo += "UNK";