diff --git a/rust/oxide-decoders/src/decoders/acars.rs b/rust/oxide-decoders/src/decoders/acars.rs index 825b769..a09a8ca 100644 --- a/rust/oxide-decoders/src/decoders/acars.rs +++ b/rust/oxide-decoders/src/decoders/acars.rs @@ -425,7 +425,7 @@ pub struct ACARSDecoder { } impl Decoder for ACARSDecoder { - fn decode(&mut self, length: u32) { + fn decode(&mut self, length: usize) { self.demod_msk(length); } @@ -477,10 +477,10 @@ impl ACARSDecoder { } } - pub fn demod_msk(&mut self, len: u32) { + pub fn demod_msk(&mut self, len: usize) { /* MSK demod */ - for in_ in &mut self.dm_buffer.into_iter().take(len as usize) { + for in_ in &mut self.dm_buffer.into_iter().take(len) { let s: f32 = 1800.0 / INTRATE as f32 * 2.0 * std::f32::consts::PI + self.msk_df; let mut v: Complex = num::Complex::new(0.0, 0.0); let mut o: f32; diff --git a/rust/oxide-decoders/src/lib.rs b/rust/oxide-decoders/src/lib.rs index 79a9b89..9d44d53 100644 --- a/rust/oxide-decoders/src/lib.rs +++ b/rust/oxide-decoders/src/lib.rs @@ -32,7 +32,7 @@ pub enum ValidDecoderType { } pub trait Decoder: Send + Sync { - fn decode(&mut self, length: u32); + fn decode(&mut self, length: usize); fn get_wf_iter(&self) -> std::slice::Iter<'_, Complex>; fn set_dm_buffer_at_index(&mut self, index: usize, value: f32); fn set_output_channel(&mut self, channel: UnboundedSender); diff --git a/rust/oxide-rtlsdr/src/lib.rs b/rust/oxide-rtlsdr/src/lib.rs index b098448..500c2df 100644 --- a/rust/oxide-rtlsdr/src/lib.rs +++ b/rust/oxide-rtlsdr/src/lib.rs @@ -335,7 +335,7 @@ impl RtlSdr { } } for channel in &mut self.channel.iter_mut().take(self.frequencies.len()) { - channel.decode(rtloutbufz as u32); + channel.decode(rtloutbufz); } }) .unwrap();