Changed some stuff

Fork of EMG by Kevin Hetterscheid

Revision:
23:8647e71ca713
Parent:
22:8c9dda710584
Child:
24:b7b3e87e0687
--- a/emg.cpp	Tue Oct 20 11:37:53 2015 +0000
+++ b/emg.cpp	Tue Oct 20 14:30:18 2015 +0000
@@ -54,5 +54,12 @@
     double output2 = fabs(output1);
     double output3 = lowpass_filter(output2);
     
+    if(output3 >= 0 && output3 < 0.0507)
+        output3 = 0.0;
+    else if(output3 >= 0.0507 && output3 < 0.0966)
+        output3 = 0.5;
+    else if(output3 >= 0.0966 && output3 < 1)
+        output3 = 1.0;
+    
     return output3;
 }
\ No newline at end of file