\r
vexTaskRegister("lcdtask");\r
\r
- static int timeout = -1;\r
+ //static int timeout = -1;\r
while (!chThdShouldTerminate()) {\r
int actual = vexEncoderGet(kVexQuadEncoder_1);\r
int diff = liftTargetLoc - actual;\r
- int speed;\r
+ int speed = 0; \r
if (diff != 0) {\r
- speed = 2 * diff;\r
-\r
- if (timeout == -1)\r
+ /*if (timeout == -1)\r
timeout = 10;\r
else if (timeout > 0)\r
timeout--;\r
else\r
- diff++;\r
+ diff *= 2;*/\r
+\r
+ speed = 2 * diff;\r
} else {\r
- timeout = -1, speed = 0;\r
+ /*timeout = -1,*/ speed = 0;\r
}\r
\r
- vexLcdPrintf(0, 1, "%4d | %4d", actual, speed);\r
+ //vexLcdPrintf(0, 1, "A%02d T%02d S%d", actual, timeout, speed);\r
vexMotorSet(mLiftLowLeft, speed);\r
vexMotorSet(mLiftHighLeft, speed);\r
vexMotorSet(mLiftLowRight, speed);\r
else if (vexControllerGet(Btn5D))\r
liftTargetLoc -= 5;\r
\r
+ if (vexControllerGet(Btn8D))\r
+ liftTargetLoc = 0;\r
+ else if (vexControllerGet(Btn8L))\r
+ liftTargetLoc = 30;\r
+ else if (vexControllerGet(Btn8R))\r
+ liftTargetLoc = 60;\r
+ else if (vexControllerGet(Btn8U))\r
+ liftTargetLoc = 90;\r
+\r
int claw = (vexControllerGet(Btn6U) ? 127 : (vexControllerGet(Btn6D) ? -127 : 0));\r
vexMotorSet(mClaw, claw);\r
\r