2532
Dependencies: QEI WS2812 PixelArray DFPlayerMini MODSERIAL PCA9685_ pca9685
Revision 6:4b007c7f0b7a, committed 2019-06-26
- 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 |
diff -r cec7f85ce6c4 -r 4b007c7f0b7a main.cpp --- 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];