From 03f613e7e6b7fea7f37e55ea3e8d3e25f2b4e436 Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Sun, 28 Dec 2025 12:44:00 -0500 Subject: [PATCH] Add M17_DEBUG prints for M17 Frame Type Validation --- reflector/M17Protocol.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reflector/M17Protocol.cpp b/reflector/M17Protocol.cpp index 5406bc1..83718f4 100644 --- a/reflector/M17Protocol.cpp +++ b/reflector/M17Protocol.cpp @@ -626,6 +626,19 @@ bool CM17Protocol::IsValidDvPacket(const CBuffer &Buffer, std::unique_ptr(new CDvFramePacket(m17)); + // DEBUG: Check FrameType + printf("M17_DEBUG: IsValidDvPacket Type=%04X Buf19=%02X CodecIn=%d\n", + m17.GetFrameType(), Buffer[19], (int)frame->GetCodecInV()); + // Need accessor for codec_in. CDvFramePacket has GetCodecIn() but it calls m_TCPack. + // Oh, CDvFramePacket doesn't expose it directly except via cast? + // CPacket has GetCodecIn() ? CPacket does NOT have GetCodecIn(). + // STCPacket has codec_in. + // CDvFramePacket has SetCodecData. + // Let's use GetCodecData if possible? No. + // Let's just print FrameType. It's enough. + + printf("M17_DEBUG: IsValidDvPacket Type=%04X Buf19=%02X\n", m17.GetFrameType(), Buffer[19]); + // check validity of packets if ( header && header->IsValid() && frame && frame->IsValid() ) return true;