my inertial sensor is acting up again
the first turn in my auton works fine (using inertial)
but the second inertial turn spins indefinetely (doesnt stop)
heres the code:
Chassis.spinFor(reverse, 100, deg);
IR.spinFor(reverse, 200, deg);
Chassis.spinFor(forward, 100, deg);
IR.spin(reverse, 100, pct);
Chassis.spinFor(forward, 200, deg);
wait(0.7, sec);
Chassis.spinFor(reverse, 200, deg);
Chassis.stop();
// Turns the robot to the right
Chassis.setStopping(brake);
LDrive.spin(forward, 30, pct);
RDrive.spin(reverse, 30, pct);
// Waits until the motor reaches a 90 degree turn and stops the Left and
// Right Motors.
waitUntil((IS.rotation(degrees) >= 200.0));
LDrive.stop();
RDrive.stop();
while (stopCata == false){
C.spin(forward);
}
C.stop();
stopCata = false;
Chassis.stop();
// Turns the robot to the right
Chassis.setStopping(brake);
IS.resetRotation();
LDrive.spin(reverse, 30, pct);
RDrive.spin(forward, 30, pct);
// Waits until the motor reaches a 90 degree turn and stops the Left and
// Right Motors.
waitUntil((IS.rotation(degrees) >= 180.0));
LDrive.stop();
RDrive.stop();
IL.set(false);
Chassis.spinFor(forward, 300, deg);
IL.set(true);
IR.spin(reverse, 100, pct);
wait(1, sec);