Included running flag in struct.

This commit is contained in:
2025-08-18 17:28:16 +02:00
parent d17ef6c7ae
commit 044cfb069a
3 changed files with 10 additions and 7 deletions

View File

@@ -20,11 +20,12 @@ pub static IMPEDANCE_SETUP: StaticCell<ImpedanceSetupType> = StaticCell::new();
pub struct ImpedanceSetup {
ad5940: AD5940,
dsp_config: Option<DspConfig>,
pub running: bool,
}
impl ImpedanceSetup {
pub fn new(ad5940: AD5940) -> Self {
ImpedanceSetup { ad5940, dsp_config: None }
ImpedanceSetup { ad5940, dsp_config: None, running: false }
}
pub async fn init(&mut self) -> Result<(), Error> {