2532

Dependencies:   QEI WS2812 PixelArray DFPlayerMini MODSERIAL PCA9685_ pca9685

Files at this revision

API Documentation at this revision

Comitter:
dimavb
Date:
Wed Jun 26 18:06:30 2019 +0000
Parent:
5:cec7f85ce6c4
Commit message:
activation trigger

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jun 24 15:25:36 2019 +0000
+++ b/main.cpp	Wed Jun 26 18:06:30 2019 +0000
@@ -326,6 +326,7 @@
     Action act = NONE;
     char dist[12];
     int activated=-1;
+    int activated_t=0;
     wait(2.5);
     mp3.mp3_stop();
     int dist_tmp[16][4];
@@ -361,9 +362,11 @@
         
         
         pc.printf("\n");
+        if (activated<0) activated_t=0;
         
-        if (activated>=0)
+        if (activated>=0 && activated_t==0)
         {
+         activated_t=1;
          act = actions[activated];
          pc.printf("activated %d action %d\n",activated,act);
          float time=actionstime[activated];