Quote:
Originally Posted by GeeTwo
Did you put this in the IsAutonomous && IsEnabled loop?
|
Yes. I figured out the problem and I'm trying to think of a way to fix it.
Code:
case 2:
if(pid.OnTarget()){
step++;
}
break;
That section of code is not change the value of step. I put "step" on the smart dash board and once it gets to case 2 it doesn't move on to case 3. I also checked the value of the encoder with the smart dashboard and it is getting to get set point.
EDIT: I just put the pid.OnTarget(); on the smart dashboard; it never changes to true. I cant figure out why.