lockin: redundant new
This commit is contained in:
parent
16c986ab1b
commit
b581a016ce
@ -7,14 +7,6 @@ pub struct Lockin {
|
||||
}
|
||||
|
||||
impl Lockin {
|
||||
/// Create a new Lockin with given IIR coefficients.
|
||||
pub fn new() -> Self {
|
||||
let lp = Lowpass::default();
|
||||
Self {
|
||||
state: [lp.clone(), lp],
|
||||
}
|
||||
}
|
||||
|
||||
/// Update the lockin with a sample taken at a given phase.
|
||||
/// The lowpass has a gain of `1 << k`.
|
||||
pub fn update(&mut self, sample: i16, phase: i32, k: u8) -> Complex<i32> {
|
||||
|
@ -34,8 +34,6 @@ const APP: () = {
|
||||
+ design_parameters::SAMPLE_BUFFER_SIZE_LOG2,
|
||||
);
|
||||
|
||||
let lockin = Lockin::new();
|
||||
|
||||
// Enable ADC/DAC events
|
||||
stabilizer.adcs.0.start();
|
||||
stabilizer.adcs.1.start();
|
||||
@ -59,7 +57,7 @@ const APP: () = {
|
||||
timestamper: stabilizer.timestamper,
|
||||
|
||||
pll,
|
||||
lockin,
|
||||
lockin: Lockin::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,6 @@ const APP: () = {
|
||||
// Configure the microcontroller
|
||||
let (mut stabilizer, _pounder) = hardware::setup(c.core, c.device);
|
||||
|
||||
let lockin = Lockin::new();
|
||||
|
||||
// Enable ADC/DAC events
|
||||
stabilizer.adcs.1.start();
|
||||
stabilizer.dacs.0.start();
|
||||
@ -39,7 +37,7 @@ const APP: () = {
|
||||
stabilizer.adc_dac_timer.start();
|
||||
|
||||
init::LateResources {
|
||||
lockin,
|
||||
lockin: Lockin::default(),
|
||||
afes: stabilizer.afes,
|
||||
adc: stabilizer.adcs.1,
|
||||
dacs: stabilizer.dacs,
|
||||
|
Loading…
Reference in New Issue
Block a user