Changed some stuff

Fork of EMG by Kevin Hetterscheid

Revision:
25:6d1b035f4838
Parent:
24:b7b3e87e0687
Child:
27:25d0ee8cd7b7
Child:
28:5a12ce2fa441
--- a/emg.cpp	Thu Oct 22 14:43:33 2015 +0000
+++ b/emg.cpp	Tue Oct 27 12:03:21 2015 +0000
@@ -132,9 +132,12 @@
     }
     last_triceps = tricout;
     
-    if (output9>0.05) {//this is the output for the left bicep (the push motion)
+    if (last_push ==0 and output9>0.06) {//this is the output for the left bicep (the push motion)
         pushout=1;
+    } else if(last_triceps == 1 and output9<0.045) {
+        pushout=0;
     } else {
-        pushout=0;
+        pushout = last_push;
     }
+    last_push = pushout;
 }
\ No newline at end of file