X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/58d60adc0400926a770932703ec1d94649b56e32..2798b7a8f62b73aa2a88d4b34e861debd6462015:/m17core/src/encode.rs diff --git a/m17core/src/encode.rs b/m17core/src/encode.rs index 8f1d1da..5e0951e 100644 --- a/m17core/src/encode.rs +++ b/m17core/src/encode.rs @@ -31,11 +31,11 @@ pub(crate) fn encode_packet(frame: &PacketFrame) -> [f32; 192] { match frame.counter { PacketFrameCounter::Frame { index } => { type1[0..25].copy_from_slice(&frame.payload); - type1[25] = (index as u8) << 3; + type1[25] = (index as u8) << 2; } PacketFrameCounter::FinalFrame { payload_len } => { type1[0..payload_len].copy_from_slice(&frame.payload[0..payload_len]); - type1[25] = (payload_len as u8) << 3 | 0x04; + type1[25] = ((payload_len as u8) << 2) | 0x80; } } let type3 = fec::encode(&type1, 206, p_3);