]> code.octet-stream.net Git - m17rt/blobdiff - m17core/src/encode.rs
Support for baseband output to a soundcard
[m17rt] / m17core / src / encode.rs
index 4fc742939d71c42a38d053a5109deda4da69c7ca..5e0951e3ff4a3c8c30f8b959b83720fb4adfb060 100644 (file)
@@ -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);