X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/4cfda08117c4288a5408d45db1ef4be82f4facaa..2798b7a8f62b73aa2a88d4b34e861debd6462015:/m17core/src/decode.rs?ds=inline diff --git a/m17core/src/decode.rs b/m17core/src/decode.rs index 115ff63..6c8e02b 100755 --- a/m17core/src/decode.rs +++ b/m17core/src/decode.rs @@ -144,8 +144,8 @@ pub(crate) fn parse_packet(frame: &[f32] /* length 192 */) -> Option 0; - let number = packet[25] >> 3; + let final_frame = (packet[25] & 0x80) > 0; + let number = (packet[25] >> 2) & 0x1f; let counter = if final_frame { PacketFrameCounter::FinalFrame { payload_len: number as usize,