Removing support for configuring IIR state
@@ -26,8 +26,6 @@ const IIR_CASCADE_LENGTH: usize = 1;
#[derive(Debug, Deserialize, StringSet)]
pub struct Settings {
afe: [AfeGain; 2],
- update_state: bool,
- iir_state: [[iir::Vec5; IIR_CASCADE_LENGTH]; 2],
iir_ch: [[iir::IIR; IIR_CASCADE_LENGTH]; 2],
}
@@ -35,8 +33,6 @@ impl Default for Settings {
fn default() -> Self {
Self {
afe: [AfeGain::G1, AfeGain::G1],
- update_state: false,
- iir_state: [[[0.; 5]; IIR_CASCADE_LENGTH]; 2],
iir_ch: [[iir::IIR::new(1., -SCALE, SCALE); IIR_CASCADE_LENGTH]; 2],
}
}
@@ -168,18 +164,13 @@ const APP: () = {
}
}
- #[task(priority = 1, resources=[mqtt_interface, afes, iir_ch, iir_state])]
+ #[task(priority = 1, resources=[mqtt_interface, afes, iir_ch])]
fn settings_update(mut c: settings_update::Context) {
let settings = &c.resources.mqtt_interface.settings;
// Update the IIR channels.
c.resources.iir_ch.lock(|iir| *iir = settings.iir_ch);
- // Update the IIR states only if explicitly requested.
- if settings.update_state {
- c.resources.iir_state.lock(|iir| *iir = settings.iir_state);
- }
-
// Update AFEs
c.resources.afes.0.set_gain(settings.afe[0]);
c.resources.afes.1.set_gain(settings.afe[1]);
