Merge pull request #278 from quartiq/feature/iir-int-debug

iir_int: make miniconf-able
This commit is contained in:
Robert Jördens 2021-02-20 21:46:59 +01:00 committed by GitHub
commit d02241fcf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
use core::f64::consts::PI;
use serde::{Deserialize, Serialize};
use miniconf::StringSet;
use serde::Deserialize;
/// Generic vector for integer IIR filter.
/// This struct is used to hold the x/y input/output data vector or the b/a coefficient
@ -55,7 +56,7 @@ fn macc(y0: i32, x: &[i32], a: &[i32], shift: u32) -> i32 {
/// See `dsp::iir::IIR` for general implementation details.
/// Offset and limiting disabled to suit lowpass applications.
/// Coefficient scaling fixed and optimized.
#[derive(Copy, Clone, Default, Deserialize, Serialize)]
#[derive(Copy, Clone, Default, Debug, StringSet, Deserialize)]
pub struct IIR {
pub ba: Vec5,
// pub y_offset: i32,