test

Dependencies:   HIDScope MODSERIAL mbed-dsp mbed

Fork of emg_filter2 by BMT M9 Groep01

Files at this revision

API Documentation at this revision

Comitter:
Tanja2211
Date:
Mon Oct 20 08:43:59 2014 +0000
Parent:
50:650e8e45b870
Child:
52:cce270e0753a
Commit message:
float

Changed in this revision

EMGfilter.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/EMGfilter.cpp	Mon Oct 20 08:42:09 2014 +0000
+++ b/EMGfilter.cpp	Mon Oct 20 08:43:59 2014 +0000
@@ -47,6 +47,8 @@
 
 float filtered_emgB;
 float filtered_emgT;
+float B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, MOVAVG_B;
+float T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, MOVAVG_T;
 
 MODSERIAL pc(USBTX,USBRX);
 
@@ -102,7 +104,7 @@
 
     // Moving Average Filter Biceps
 
-    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+B6*0.1+B7*0.1+B8*0.1+B9*0.1;
@@ -143,7 +145,7 @@
 
     // Moving Average Filter Triceps
 
-    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+T6*0.1+T7*0.1+T8*0.1+T9*0.1;