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 35:7556e792c260, committed 2014-10-17
- Comitter:
- Tanja2211
- Date:
- Fri Oct 17 11:15:18 2014 +0000
- Parent:
- 34:9159886ce09e
- Child:
- 36:82fd9d862266
- Commit message:
- zonder return
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:09:09 2014 +0000
+++ b/EMGfilter.cpp Fri Oct 17 11:15:18 2014 +0000
@@ -100,10 +100,10 @@
scope.set(1,filtered_emgB); //processed float
scope.send();
- float B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 MOVAVG_B;
+ float B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, MOVAVG_B;
{
B0=filtered_emgB;
- MOVAVG_B=B0*0.1+B1*0.1+B2*0.1+B3*0.1+B4*0.1+B5*0.1+B7*0.1+B8*0.1+B9*0.1
+ MOVAVG_B=B0*0.1+B1*0.1+B2*0.1+B3*0.1+B4*0.1+B5*0.1+B7*0.1+B8*0.1+B9*0.1;
B9=B8;
B8=B7;
B7=B6;
@@ -114,13 +114,12 @@
B2=B1;
B1=B0;
- return MOVAVG_B;
}
- float T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 MOVAVG_T;
+ 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
+ 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;
@@ -131,7 +130,6 @@
T2=T1;
T1=T0;
- return MOVAVG_T;
}
void looperT()
