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_filter2 by
Revision 31:b6f7ba4938d4, committed 2014-10-17
- Comitter:
- Tanja2211
- Date:
- Fri Oct 17 10:52:54 2014 +0000
- Parent:
- 30:5d8e6f0fabc1
- Child:
- 32:1bc34d137942
- Commit message:
- MAF Triceps
Changed in this revision
| EMGfilter.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/EMGfilter.cpp Fri Oct 17 10:36:29 2014 +0000
+++ b/EMGfilter.cpp Fri Oct 17 10:52:54 2014 +0000
@@ -117,6 +117,21 @@
return MOVAVG_B;
}
+ MAF::MAF() {}
+ float MAF::update(float filtered_emgT) {
+ T[0]=filtered_emgT;
+ MOVAVG_T=T[0]*0.1+T[1]*0.1+T[2]*0.1+T[3]*0.1+T[4]*0.1+T[5]*0.1+T[7]*0.1+T[8]*0.1+T[9]*0.1
+ T[9]=T[8];
+ T[8]=T[7];
+ T[7]=T[6];
+ T[6]=T[5];
+ T[5]=T[4];
+ T[4]=T[3];
+ T[3]=T[2];
+ T[2]=T[1];
+ T[1]=T[0];
+
+ return MOVAVG_T;
}
void looperT()
