lockin: 2nd order lowpass

master
Robert Jördens 2021-02-11 23:15:32 +01:00
parent b49f0a2eb9
commit 32b7058b47
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
use super::{lowpass::Lowpass, Complex};
use generic_array::typenum::U4;
use generic_array::typenum::U2;
#[derive(Clone, Default)]
pub struct Lockin {
state: [Lowpass<U4>; 2],
state: [Lowpass<U2>; 2],
}
impl Lockin {

View File

@ -126,7 +126,7 @@ const APP: () = {
let conf = "frequency_discriminator";
let output = match conf {
// Convert from IQ to power and phase.
"power_phase" => [(output.log2() << 10) as _, output.arg()],
"power_phase" => [(output.log2() << 24) as _, output.arg()],
"frequency_discriminator" => [pll_frequency as _, output.arg()],
_ => [output.0 << 16, output.1 << 16],
};