fec::{self, p_1, p_2, p_3},
interleave::interleave,
protocol::{
- LsfFrame, PacketFrame, PacketFrameCounter, StreamFrame, BERT_SYNC, LSF_SYNC, PACKET_SYNC,
- STREAM_SYNC,
+ LsfFrame, PacketFrame, PacketFrameCounter, StreamFrame, BERT_SYNC, END_OF_TRANSMISSION,
+ LSF_SYNC, PACKET_SYNC, PREAMBLE, STREAM_SYNC,
},
random::random_xor,
};
Bert,
Stream,
Packet,
+ Preamble,
+ EndOfTransmission,
}
impl SyncBurst {
Self::Bert => BERT_SYNC,
Self::Stream => STREAM_SYNC,
Self::Packet => PACKET_SYNC,
+ Self::Preamble => PREAMBLE,
+ Self::EndOfTransmission => END_OF_TRANSMISSION,
}
}
}
Some(packet) => packet,
None => return None,
};
- // TODO: the spec is inconsistent about which bit in packet[25] is EOF
- // https://github.com/M17-Project/M17_spec/issues/147
let final_frame = (packet[25] & 0x80) > 0;
let number = (packet[25] >> 2) & 0x1f;
let counter = if final_frame {