@@ -0,0 +1,1983 @@
+package org.usfirst.frc.team6027.robot.commands;%0A%0Aimport edu.wpi.first.wpilibj.PIDController;%0Aimport edu.wpi.first.wpilibj.PIDOutput;%0Aimport edu.wpi.first.wpilibj.PIDSource;%0Aimport edu.wpi.first.wpilibj.PIDSourceType;%0Aimport edu.wpi.first.wpilibj.command.Command;%0Aimport org.usfirst.frc.team6027.robot.Robot;%0A%0A/**%0A * Created by colso on 1/12/2017.%0A */%0Apublic class RotateDriveTrain extends Command%7B%0A    private PIDController pid;%0A%0A    public RotateDriveTrain(double theta)%7B%0A        requires(Robot.drivetrain);%0A        pid = new PIDController(0.01, 0, 0, new PIDSource()%7B%0A            PIDSourceType source = PIDSourceType.kDisplacement;%0A            @Override%0A            public double pidGet() %7B%0A                if(Robot.oi.getGyro().getAngle()%3C0)%7B%0A                    return Robot.oi.getGyro().getAngle() + 360;%0A                %7D%0A                else%7B%0A                    return Robot.oi.getGyro().getAngle();%0A                %7D%0A            %7D%0A%0A            @Override%0A            public void setPIDSourceType(PIDSourceType pidSource) %7B%0A                source = pidSource;%0A            %7D%0A%0A            @Override%0A            public PIDSourceType getPIDSourceType() %7B%0A                return source;%0A            %7D%0A        %7D,new PIDOutput()%7B%0A            @Override%0A            public void pidWrite(double d) %7B%0A                Robot.drivetrain.drive(0, d);%0A            %7D%0A        %7D);%0A        pid.setAbsoluteTolerance(1);%0A        pid.setInputRange(0,360);%0A        pid.setSetpoint(theta);%0A    %7D%0A%0A    @Override%0A    protected void initialize() %7B%0A        Robot.gyro.calibrateGyro();%0A        pid.reset();%0A        pid.enable();%0A    %7D%0A%0A    @Override%0A    protected void execute() %7B%0A%0A    %7D%0A%0A    @Override%0A    protected boolean isFinished() %7B%0A        return pid.onTarget();%0A    %7D%0A%0A    @Override%0A    protected void end() %7B%0A        pid.disable();%0A        Robot.drivetrain.drive(0, 0);%0A    %7D%0A%0A    @Override%0A    protected void interrupted() %7B%0A        pid.disable();%0A        Robot.drivetrain.drive(0, 0);%0A    %7D%0A%7D%0A

Add rotation PID command