/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package storm2013.commands;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.command.Command;
import storm2013.Robot;

/**
 *
 * @author evan1026
 */
public class SpinTomahawk extends Command {
    
    
    private boolean _hasChanged;
    
    public SpinTomahawk(){
        requires(Robot.tomahawk);
    }
    
    protected void initialize() {
        Robot.tomahawk.move();
        _hasChanged = false;
        System.out.println("Turning tomahawk");
    }

    protected void execute() {
        if (Robot.tomahawk.isForward()) {
            System.out.println("tomahawk forward");
            _hasChanged = true;
        }
    }

    protected boolean isFinished() {
        return _hasChanged && !Robot.tomahawk.isForward();
    }

    protected void end() {
        Robot.tomahawk.stop();
    }

    protected void interrupted() {
        end();
    }
}

@@ -126,88 +126,8 @@
 s;%0A%0A
-import edu.wpi.first.wpilibj.DigitalInput;%0Aimport edu.wpi.first.wpilibj.Jaguar;%0A
 impo
@@ -934,11 +934,92 @@
 );%0A    %7D
+%0A%0A    public synchronized boolean isInterruptible() %7B%0A        return false;%0A    %7D
 %0A%7D%0A

Make SpinTomahawk uninterruptible