dsp: clippy

This commit is contained in:
Robert Jördens 2021-02-01 18:45:59 +01:00
parent 2a84e3f299
commit f02d3cc95b
2 changed files with 2 additions and 4 deletions

View File

@ -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],
}
}

View File

@ -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"