// RobotBuilder Version: 0.0.2
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in th future.
package org.usfirst.frc2877.RoadKill.commands;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc2877.RoadKill.Robot;
/**
 *
 */
public class  Drive1 extends Command {
    public Drive1() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
        requires(Robot.driveTrain);
	
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
    }
    private Timer timer;
    // Called just before this Command runs the first time
    protected void initialize() {
        timer.start();
    }
    // Called repeatedly when this Command is scheduled to run
    protected void execute( double speed ) {
        timer.reset();
        Robot.driveTrain.runMotor1(speed);
    }
    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return timer.get() > 3.0e6;
    }
    // Called once after isFinished returns true
    protected void end() {
        Robot.driveTrain.runMotor1( 0 );
    }
    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}

@@ -1796,22 +1796,38 @@
 rupted() %7B%0D%0A
+        end();%0D%0A
     %7D%0D%0A%7D%0D%0A

add end() call to interrupted()