Changed some stuff

Fork of EMG by Kevin Hetterscheid

Revision:
27:25d0ee8cd7b7
Parent:
26:bd50afa17436
Parent:
25:6d1b035f4838
--- a/emg.cpp	Wed Oct 28 13:39:45 2015 +0000
+++ b/emg.cpp	Wed Oct 28 13:42:32 2015 +0000
@@ -134,9 +134,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