涼太郎 中村 / Locate

Dependents:   4thcomp 6th33222_copy

Fork of Locate by Tk A

Files at this revision

API Documentation at this revision

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()