Andriy Makukha / Mbed 2 deprecated football_project_wo_output

Dependencies:   mbed

Fork of football_project by MZJ

Revision:
31:a6110950f385
Parent:
30:c60b0d52b067
Child:
32:64e5d7340d82
--- a/proto_code.cpp	Mon Jan 04 16:33:39 2016 +0000
+++ b/proto_code.cpp	Tue Jan 05 13:05:48 2016 +0000
@@ -208,6 +208,8 @@
     }
      
     last_state = state;
+
+    ta.resetTouchIfStuck();
   
     char message = 'n';
     timer = millis() - start;
@@ -1272,7 +1274,8 @@
   if(time - last_time > DEBOUNCE_MS)
   {
     last_time = time;
-    buttons = ta.buttons();
+    buttons = ta.buttons() | TA::buttonsRising;
+    TA::buttonsRising = 0;
   }
   
   return buttons;