diff --git a/dsp/src/lockin.rs b/dsp/src/lockin.rs index 58670c7..ea80836 100644 --- a/dsp/src/lockin.rs +++ b/dsp/src/lockin.rs @@ -14,9 +14,7 @@ impl Lockin { /// Create a new Lockin with given IIR coefficients. pub fn new(ba: Vec5) -> Self { Self { - iir: IIR { - ba, - }, + iir: IIR { ba }, state: [Vec5::default(); 2], } } diff --git a/dsp/src/rpll.rs b/dsp/src/rpll.rs index 108464e..d4bd86f 100644 --- a/dsp/src/rpll.rs +++ b/dsp/src/rpll.rs @@ -66,7 +66,7 @@ impl RPLL { // Reference phase (1 << dt2 full turns) with gain/attenuation applied let p_ref = 1u32 << (32 + self.dt2 - shift_frequency); // Update frequency lock - self.ff = self.ff.wrapping_add(p_ref.wrapping_sub(p_sig) as u32); + self.ff = self.ff.wrapping_add(p_ref.wrapping_sub(p_sig)); // Time in counter cycles between timestamp and "now" let dt = (x.wrapping_neg() & ((1 << self.dt2) - 1)) as u32; // Reference phase estimate "now"