From 4da8a1c74af91d8caa8d3b9acb5e8df7c82b1909 Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F." Date: Tue, 8 Oct 2024 12:01:21 +0200 Subject: [PATCH] Added RtAps::reset() method, in progress of placing signal generator code in module. Therefore, not working intermediate code --- src/rt/rtaps.rs | 10 ++++++++++ src/{ => siggen}/siggen.rs | 0 2 files changed, 10 insertions(+) rename src/{ => siggen}/siggen.rs (100%) diff --git a/src/rt/rtaps.rs b/src/rt/rtaps.rs index 4956af8..f677e0b 100644 --- a/src/rt/rtaps.rs +++ b/src/rt/rtaps.rs @@ -136,6 +136,11 @@ impl RtAps { let mut lck = self.status.lock(); lck.take() } + + /// Reset power spectra estimator, start with a clean sleeve + pub fn reset(&self) { + self.sender.send(RtApsMessage::ResetStatus).unwrap(); + } } impl Drop for RtAps { fn drop(&mut self) { @@ -158,6 +163,11 @@ impl RtAps { } None } + + #[pyo3(name = "reset")] + fn reset_py(&self) { + self.reset() + } } #[cfg(test)] diff --git a/src/siggen.rs b/src/siggen/siggen.rs similarity index 100% rename from src/siggen.rs rename to src/siggen/siggen.rs