This code was written in C++ pro for our Competition Auton and when testing it only one side intake works and it’s moving in the wrong direction and only one wheel on the chassis is moving. Any help would be appreciated, thank you!
switch(autonomousSelection)
{
case 0: // Blue side green
mov.startIntake(INTl, INTr, 100, vex::directionType::rev);
mov.forward(7, chas, 75, false); //move towards first cube
vex::task::sleep(1000);
mov.stopIntake(INTl, INTr, vex::brakeType::brake); //first cube collected
mov.forward(8, chas, 75, false); //center with second cube
mov.right(chas, 90); //turn towards second cube
mov.startIntake(INTl, INTr, 100, vex::directionType::rev);
mov.forward(25, chas, 75, false); //move towards second cube
vex::task::sleep(1000);
mov.stopIntake(INTl, INTr, vex::brakeType::brake);
mov.right(chas, 90); //turn to face alliance wall
mov.forward(14, chas, 75, false); //move towards alliance wall
mov.left(chas, 90); //turn towards goal
mov.forward(4, chas, 50, false); // move towards goal
tilt.rotateFor(690, vex::rotationUnits::deg, 50, vex::velocityUnits::pct);
mov.backward(4, chas, 50, false); //back up from stack
break;
case 1: // Red side orange
mov.startIntake(INTl, INTr, 100, vex::directionType::rev);
mov.forward(7, chas, 75, false); //move towards first cube
vex::task::sleep(1000);
mov.stopIntake(INTl, INTr, vex::brakeType::brake); //first cube collected
mov.forward(8, chas, 75, false); //center with second cube
mov.left(chas, 90); //turn towards second cube
mov.startIntake(INTl, INTr, 100, vex::directionType::rev);
mov.forward(25, chas, 75, false); //move towards second cube
vex::task::sleep(1000);
mov.stopIntake(INTl, INTr, vex::brakeType::brake);
mov.left(chas, 90); //turn to face alliance wall
mov.forward(14, chas, 75, false); //move towards alliance wall
mov.right(chas, 90); //turn towards goal
mov.forward(4, chas, 50, false); // move towards goal
tilt.rotateFor(690, vex::rotationUnits::deg, 50, vex::velocityUnits::pct);
mov.backward(4, chas, 50, false); //back up from stack
break;
default:
break;
}
}