]> git.droids-corp.org - aversive.git/blobdiff - projects/microb2010/mainboard/robotsim.c
current limit on shovel
[aversive.git] / projects / microb2010 / mainboard / robotsim.c
index 7c5283576c21d25343d53360e5fde1ed7867b150..42a33d9a95fc5fa2676abab379b3147faf766c0a 100644 (file)
@@ -227,8 +227,8 @@ void robotsim_update(void)
                ((local_r_pwm * 1000 * FILTER2)/1000);
 
        /* basic collision detection */
-       a2 = atan2(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_FRONT);
-       d = norm(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_FRONT);
+       a2 = atan2(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_REAR);
+       d = norm(ROBOT_WIDTH/2, ROBOT_HALF_LENGTH_REAR);
 
        xfl = x + cos(a+a2) * d;
        yfl = y + sin(a+a2) * d;