@@ -0,0 +1,1459 @@
+/*%0D%0A * To change this license header, choose License Headers in Project Properties.%0D%0A * To change this template file, choose Tools %7C Templates%0D%0A * and open the template in the editor.%0D%0A */%0D%0Apackage edu.wpi.first.wpilibj.templates.commands;%0D%0A%0D%0A/**%0D%0A *%0D%0A * @author Robotics%0D%0A */%0D%0Apublic class ShootAtDistance extends CommandBase %7B%0D%0A    private static final double DISTANCE_TO_SHOOT_FROM = 10;%0D%0A    %0D%0A    public ShootAtDistance() %7B%0D%0A        // Use requires() here to declare subsystem dependencies%0D%0A        // eg. requires(chassis);%0D%0A        requires(shooter);%0D%0A        requires(sharedSensors);%0D%0A    %7D%0D%0A%0D%0A    // Called just before this Command runs the first time%0D%0A    protected void initialize() %7B%0D%0A    %7D%0D%0A%0D%0A    // Called repeatedly when this Command is scheduled to run%0D%0A    protected void execute() %7B%0D%0A        if (sharedSensors.getAverageUltrasonicDistance() %3C= DISTANCE_TO_SHOOT_FROM) %7B%0D%0A            shooter.pullBack(shooter.pullSpeed);%0D%0A            if (shooter.isDown()) %7B%0D%0A                shooter.shoot();%0D%0A            %7D%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    // Make this return true when this Command no longer needs to run execute()%0D%0A    protected boolean isFinished() %7B%0D%0A        return shooter.isTriggered();%0D%0A    %7D%0D%0A%0D%0A    // Called once after isFinished returns true%0D%0A    protected void end() %7B%0D%0A    %7D%0D%0A%0D%0A    // Called when another command which requires one or more of the same%0D%0A    // subsystems is scheduled to run%0D%0A    protected void interrupted() %7B%0D%0A    %7D%0D%0A%7D%0D%0A

Created new command, Shoot At Distance. it shoots when the robot is at a certain distance from something.