X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/e67ea96c8a3d7c23ba29c6ed91ddb451927176a1..f9af623dd10c967733af7bfb5efa20fbc7033072:/m17core/src/modem.rs diff --git a/m17core/src/modem.rs b/m17core/src/modem.rs index af36ab4..2f92ba9 100644 --- a/m17core/src/modem.rs +++ b/m17core/src/modem.rs @@ -1,4 +1,6 @@ -use crate::decode::{parse_lsf, parse_stream, sync_burst_correlation, SyncBurst, SYNC_THRESHOLD}; +use crate::decode::{ + parse_lsf, parse_packet, parse_stream, sync_burst_correlation, SyncBurst, SYNC_THRESHOLD, +}; use crate::protocol::Frame; use crate::shaping::RRC_48K; use log::debug; @@ -131,7 +133,11 @@ impl Demodulator for SoftDemodulator { } } SyncBurst::Packet => { - debug!("Found PACKET at sample {} diff {}", start_sample, c.diff) + debug!("Found PACKET at sample {} diff {}", start_sample, c.diff); + if let Some(frame) = parse_packet(&pkt_samples) { + self.suppress = 191 * 10; + return Some(Frame::Packet(frame)); + } } } }