From 93a911520a469d9e8cad25cfb94e12e955780a88 Mon Sep 17 00:00:00 2001 From: Bruce Flynn Date: Tue, 2 Apr 2024 11:41:11 -0500 Subject: [PATCH] allow unsetting pn --- Cargo.toml | 2 +- src/framing.rs | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d1209e7..de563bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ccsds" -version = "0.1.0-beta.3" +version = "0.1.0-beta.4" authors = ["Bruce Flynn "] edition = "2021" description = "CCSDS spacecraft data stream decoding" diff --git a/src/framing.rs b/src/framing.rs index 5a1a251..aba0953 100644 --- a/src/framing.rs +++ b/src/framing.rs @@ -402,20 +402,6 @@ where /// Default number of frames to buffer in memory while waiting for RS. pub const DEFAULT_BUFFER_SIZE: usize = 1024; - // pub fn new() -> Self { - // let mut skip_vcids: HashSet = HashSet::new(); - // skip_vcids.insert(VCID_FILL); - // - // FrameDecoderBuilder { - // interleave: 0, - // pn_decoder: None, - // reed_solomon: None, - // reed_solomon_threads: 0, // Let rayon decide - // reed_solomon_skip_vcids: skip_vcids, - // buffer_size: Self::DEFAULT_BUFFER_SIZE, - // } - // } - /// Limits the number of block waiting in memory for RS. /// See ``FrameDecoderBuilder::DEFAULT_BUFFER_SIZE``. #[must_use] @@ -446,8 +432,8 @@ where /// Set pseudo-noise implementation. #[must_use] - pub fn pn_decode(mut self, pn: P) -> Self { - self.pn_decoder = Some(pn); + pub fn pn_decode(mut self, pn: Option

) -> Self { + self.pn_decoder = pn; self }