iir: fix comment [nfc]
This commit is contained in:
parent
cf086abaed
commit
38dfd48c14
@ -163,7 +163,7 @@ impl IIR {
|
||||
debug_assert!(xy.len() == n);
|
||||
// `xy` contains x0 x1 y0 y1 y2
|
||||
// Increment time x1 x2 y1 y2 y3
|
||||
// Rotate y3 x1 x2 y1 y2
|
||||
// Shift x1 x1 x2 y1 y2
|
||||
xy.copy_within(0..n - 1, 1); // unrolls better than xy.rotate_right(1)
|
||||
// Store x0 x0 x1 x2 y1 y2
|
||||
xy[0] = x0;
|
||||
|
@ -758,10 +758,10 @@ const APP: () = {
|
||||
let x0 = f32::from(*adc0 as i16);
|
||||
let y0 = c.resources.iir_ch[0]
|
||||
.update(&mut c.resources.iir_state[0], x0);
|
||||
// note(unsafe): The filter limits ensure that the value is in range.
|
||||
// Note(unsafe): The filter limits ensure that the value is in range.
|
||||
// The truncation introduces 1/2 LSB distortion.
|
||||
let y0 = unsafe { y0.to_int_unchecked::<i16>() };
|
||||
// convert to DAC code
|
||||
// Convert to DAC code
|
||||
y0 as u16 ^ 0x8000
|
||||
};
|
||||
|
||||
@ -769,10 +769,10 @@ const APP: () = {
|
||||
let x1 = f32::from(*adc1 as i16);
|
||||
let y1 = c.resources.iir_ch[1]
|
||||
.update(&mut c.resources.iir_state[1], x1);
|
||||
// note(unsafe): The filter limits ensure that the value is in range.
|
||||
// Note(unsafe): The filter limits ensure that the value is in range.
|
||||
// The truncation introduces 1/2 LSB distortion.
|
||||
let y1 = unsafe { y1.to_int_unchecked::<i16>() };
|
||||
// convert to DAC code
|
||||
// Convert to DAC code
|
||||
y1 as u16 ^ 0x8000
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user