Here is the code:
//Turn function for autonomous rounds
void autonTurn(int degrees,int speed) {
int realValue = degrees * 3; // constant for robot adjustment (degrees to inches) TBD
R1.setVelocity(speed,percent);
R2.setVelocity(speed,percent);
R3.setVelocity(speed,percent);
L1.setVelocity(speed,percent);
L2.setVelocity(speed,percent);
L3.setVelocity(speed,percent);
R1.spinFor(reverse,realValue,degrees,false);
R2.spinFor(reverse,realValue,degrees,false);
R3.spinFor(reverse,realValue,degrees,false);
L1.spinFor(forward,realValue,degrees,false);
L2.spinFor(forward,realValue,degrees,false);
L3.spinFor(forward,realValue,degrees,true);
wait(0.25,seconds);
}
//Drive function for autonomous rounds
void autonDrive(double inches,int speed) {
int realValue = inches * 55; //constant for robot adjustment (degrees to inches) TBD
R1.setVelocity(speed,percent);
R2.setVelocity(speed,percent);
R3.setVelocity(speed,percent);
L1.setVelocity(speed,percent);
L2.setVelocity(speed,percent);
L3.setVelocity(speed,percent);
R1.spinFor(forward,realValue,degrees,false);
R2.spinFor(forward,realValue,degrees,false);
R3.spinFor(forward,realValue,degrees,false);
L1.spinFor(forward,realValue,degrees,false);
L2.spinFor(forward,realValue,degrees,false);
L3.spinFor(forward,realValue,degrees,true);
wait(0.25,seconds);
}
Here is the error:
It is referring to the spinFors in the autonTurn function. The lines are exactly the same as the ones in the autonDrive function. Any ideas why this could be giving an error? I read the little documentation article and my lines are exactly how it should be.