So I’ve been using the same inertial sensor on our robot for two years now, but we recently moved the gyro mount on the robot. The gyro has been moved directly down about 2 inches, but kept the exact same orientation. When I tell the robot to turn during autonomous, the drivetrain turns in the opposite direction, and turns infinitely. Any help? My code for autonomous is below.
void autonomous(void)
{
// Calibrate the GPS Sensor before starting
smartdrive autodrive(LeftMotors, RightMotors, Inertial3, 8.3, 12.5, 8, inches, 1.66);
autodrive.setDriveVelocity(100,percent);
autodrive.setTurnVelocity(75,percent);
Blocker.spinToPosition(360,degrees);
autodrive.driveFor(forward,22,inches);
autodrive.turnFor(left,15,degrees);
autodrive.driveFor(forward,12,inches);
intakeMotors.spinToPosition(80,degrees);
autodrive.driveFor(reverse,32,inches);
intakeMotors.spinToPosition(-40,degrees);
intakeMotors.resetRotation();
autodrive.turnFor(left,60,degrees);
autodrive.setDriveVelocity(60,percent);
autodrive.driveFor(reverse,4,inches);
}
P.S. I’m still using the Vexcode Pro V5 client, could that be the issue?