From 6f3a30292c4ef54ea2c861a66478a7250e12afa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Sat, 20 Feb 2021 20:27:30 +0100 Subject: [PATCH] iir_int: make miniconf-able --- dsp/src/iir_int.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsp/src/iir_int.rs b/dsp/src/iir_int.rs index 4af50f1..02fdeb1 100644 --- a/dsp/src/iir_int.rs +++ b/dsp/src/iir_int.rs @@ -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,