Skip to content

Commit

Permalink
#173: Added a simple_ema.h file
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitryP6 committed Dec 1, 2024
1 parent 5e4840d commit 6811331
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/simple_ema.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>
#include "simple_ema.h"

// Exponential Moving Average Lowpass Filter
void ema_filter(float current_value, float *previous_ema, float alpha)
{
*previous_ema =
Expand Down
7 changes: 7 additions & 0 deletions middleware/simple_ema.h
Original file line number Diff line number Diff line change
@@ -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 */

0 comments on commit 6811331

Please sign in to comment.