Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 26:4670968fbc63, committed 2020-10-28
- Comitter:
- g0dd4
- Date:
- Wed Oct 28 23:05:19 2020 +0000
- Parent:
- 25:216e62f05f82
- Commit message:
- Ajout OFFSET;
Changed in this revision
captUS.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 216e62f05f82 -r 4670968fbc63 captUS.cpp --- a/captUS.cpp Wed Oct 28 22:40:13 2020 +0000 +++ b/captUS.cpp Wed Oct 28 23:05:19 2020 +0000 @@ -2,7 +2,8 @@ #include "pins.h" /* #define */ -#define DISTLIM 600 +#define DISTLIM 800 +#define OFFSET 200 #define MAXMOY 1 /* Variables globales */ @@ -69,7 +70,7 @@ if((objRecule[indice]==0) && (fnc == 2)) { //if ((distt[5] >= DISTLIM) && (distt[0] >= DISTLIM) && (distt[1] >= DISTLIM)) { //if (((distt[5] >= DISTLIM) && (distt[0] >= DISTLIM) && (distt[1] >= DISTLIM)) /*|| ((distt[5] < 0) && (distt[0] < 0) && (distt[1] < 0))*/) { - if ((ttt[5] >= DISTLIM) && (ttt[0] >= DISTLIM) && (ttt[1] >= DISTLIM)) { + if ((ttt[5] >= DISTLIM-OFFSET) && (ttt[0] >= DISTLIM) && (ttt[1] >= DISTLIM-OFFSET)) { wtt = 1; } @@ -83,7 +84,7 @@ else if((objRecule[indice]==1) && (fnc == 2)) { //if ((distt[2] >= DISTLIM) && (distt[3] >= DISTLIM) && (distt[4] >= DISTLIM)) { //if (((distt[2] >= DISTLIM) && (distt[3] >= DISTLIM) && (distt[4] >= DISTLIM)) /*|| ((distt[2] < 0) && (distt[3] < 0) && (distt[4] < 0))*/) { - if ((ttt[2] >= DISTLIM) && (ttt[3] >= DISTLIM) && (ttt[4] >= DISTLIM)) { + if ((ttt[2] >= DISTLIM-OFFSET) && (ttt[3] >= DISTLIM) && (ttt[4] >= DISTLIM-OFFSET)) { wtt=1; }