package edu.stuy.commands;

import edu.stuy.Robot;
import edu.wpi.first.wpilibj.command.Command;

/**
 * Rotates the Robot without PID values
 */

public class DrivetrainRotateNoPIDCommand extends Command {

    private double degrees;
    private double startAngle;

    public DrivetrainRotateNoPIDCommand(double _degrees) {
        requires(Robot.drivetrain);
        degrees = _degrees;
        startAngle = Robot.drivetrain.getGyroAngle();
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        if (degrees < 0) {
            Robot.drivetrain.tankDrive(-0.5, 0.5);
        } else if (degrees > 0) {
            Robot.drivetrain.tankDrive(0.5, -0.5);
        }
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        double soFar = Math.abs(startAngle - Robot.drivetrain.getGyroAngle());
        if (degrees < 0) {
            return soFar <= degrees;
        } else if (degrees > 0) {
            return soFar >= degrees;
        } else {
            return true;
        }
    }

    // Called once after isFinished returns true
    protected void end() {
        Robot.drivetrain.stop();
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}
@@ -940,87 +940,8 @@
 ) %7B%0A
-        double soFar = Math.abs(startAngle - Robot.drivetrain.getGyroAngle());%0A
     
@@ -948,33 +948,34 @@
     if (degrees 
-%3C
+==
  0) %7B%0A          
@@ -987,24 +987,12 @@
 urn 
-soFar %3C= degrees
+true
 ;%0A  
@@ -1003,33 +1003,16 @@
   %7D else
- if (degrees %3E 0)
  %7B%0A     
@@ -1029,66 +1029,83 @@
 urn 
-soFar %3E= degrees;%0A        %7D else %7B%0A            return true
+Math.abs(Robot.drivetrain.getGyroAngle() - startAngle) %3E= Math.abs(degrees)
 ;%0A  

Add tentative fix to isFinished using magnitudes rather than the pos/neg values