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.
Dependents: 4thcomp 6th33222_copy
Fork of Locate by
Revision 8:ecd49a9ee2ee, committed 2016-09-11
- Comitter:
- choutin
- Date:
- Sun Sep 11 12:05:24 2016 +0000
- Parent:
- 7:08dfba38d5d9
- Child:
- 9:69fe7b8350c6
- Commit message:
- a
Changed in this revision
| locate.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/locate.cpp Sun Sep 11 11:39:36 2016 +0000
+++ b/locate.cpp Sun Sep 11 12:05:24 2016 +0000
@@ -24,7 +24,7 @@
int *virtual_v;
float virtual_theta = 0;
float virtual_ptheta = 0;
-int teamcolor;
+int teamcolor = -1;
/*************変数宣言終了******************/
@@ -77,7 +77,7 @@
v = (r - pr + l - pl);
xcount += v * cos(theta);
- ycount += teamcolor*v * sin(theta);
+ ycount += v * sin(theta);
pr = r;
pl = l;
@@ -95,7 +95,7 @@
r = -convert_enc_count(count1, dir1);
l = -convert_enc_count(count2, dir2);
- theta = teamcolor *(r - l) * ROUND;
+ theta = teamcolor * (r - l) * ROUND;
v = (r - pr + l - pl);
xcount += v * cos(theta);
@@ -112,7 +112,7 @@
int coordinateY()
{
- return teamcolor * ycount * LOCATE_STEP / 2;
+ return ycount * LOCATE_STEP / 2;
}
float coordinateTheta()
