From 6811331e5e1356367c5bde5f482fcb7bf9904bfa Mon Sep 17 00:00:00 2001 From: DimitryP6 Date: Sun, 1 Dec 2024 18:54:53 -0500 Subject: [PATCH] #173: Added a simple_ema.h file --- middleware/simple_ema.c | 2 +- middleware/simple_ema.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 middleware/simple_ema.h diff --git a/middleware/simple_ema.c b/middleware/simple_ema.c index c1912a0..567b107 100644 --- a/middleware/simple_ema.c +++ b/middleware/simple_ema.c @@ -1,6 +1,6 @@ #include +#include "simple_ema.h" -// Exponential Moving Average Lowpass Filter void ema_filter(float current_value, float *previous_ema, float alpha) { *previous_ema = diff --git a/middleware/simple_ema.h b/middleware/simple_ema.h new file mode 100644 index 0000000..901e787 --- /dev/null +++ b/middleware/simple_ema.h @@ -0,0 +1,7 @@ +#ifndef SIMPLE_EMA +#define SIMPLE_EMA + +// Exponential Moving Average Lowpass Filter +ema_filter(float current_value, float *previous_ema, float alpha); + +#endif /* SIMPLE_EMA */ \ No newline at end of file