diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2021-04-18 15:10:51 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2021-04-18 15:10:51 -0400 |
commit | ab0f6acf4d7a75f2d6573526acbc9948dbf2c110 (patch) | |
tree | 8ee3a584e16de13b230d95c633bccb3aa57ab912 /gui/demos/2_iir_echo.cpp | |
parent | ae99ff59678d80b0fdd0decb172aabd122226d62 (diff) |
ui: toolbar fixes, disable elements on run
Diffstat (limited to 'gui/demos/2_iir_echo.cpp')
-rw-r--r-- | gui/demos/2_iir_echo.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gui/demos/2_iir_echo.cpp b/gui/demos/2_iir_echo.cpp index 0bd7e9d..acb5c5d 100644 --- a/gui/demos/2_iir_echo.cpp +++ b/gui/demos/2_iir_echo.cpp @@ -1,10 +1,12 @@ -adcsample_t *process_data(adcsample_t *samples, unsigned int size) +Sample *process_data(Samples samples) { - constexpr float alpha = 0.7; + constexpr unsigned int size = samples.size(); constexpr unsigned int D = 2000; - static adcsample_t output[SIZE]; - static adcsample_t prev[D]; // prev[0] = output[0 - D] + float alpha = readalt() / 4095.; + + static Sample output[size]; + static Sample prev[D]; // prev[0] = output[0 - D] // Do calculations with previous output for (unsigned int i = 0; i < D; i++) |