Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL mbed-dsp mbed
Fork of emg_filter by
Revision 37:c5b3935e59a6, committed 2014-10-17
- Comitter:
- Tanja2211
- Date:
- Fri Oct 17 11:44:02 2014 +0000
- Parent:
- 36:82fd9d862266
- Child:
- 38:7ed04177892b
- Commit message:
- MAVGF
Changed in this revision
| EMGfilter.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/EMGfilter.cpp Fri Oct 17 11:24:22 2014 +0000
+++ b/EMGfilter.cpp Fri Oct 17 11:44:02 2014 +0000
@@ -136,10 +136,12 @@
scope.set(2,emg_valueT); //uint value
scope.set(3,filtered_emgT); //processed float
scope.send();
+
float T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, MOVAVG_T;
- {
+
T0=filtered_emgT;
MOVAVG_T=T0*0.1+T1*0.1+T2*0.1+T3*0.1+T4*0.1+T5*0.1+T7*0.1+T8*0.1+T9*0.1;
+
T9=T8;
T8=T7;
T7=T6;
@@ -149,7 +151,7 @@
T3=T2;
T2=T1;
T1=T0;
- }
+
}
