@@ -0,0 +1,1838 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage org.tamankeet3933.java2014.commands.raw;%0A%0Aimport org.tamankeet3933.java2014.commands.CommandBase;%0A%0A/**%0A *%0A * @author david%0A */%0Apublic class MoveCollector extends CommandBase %7B%0A    %0A    int position;%0A    double finalPosition;%0A    boolean stop = false;%0A    public final double ERROR = 0.01;%0A    %0A    public MoveCollector(int position) %7B%0A        // Use requires() here to declare subsystem dependencies%0A        // eg. requires(chassis);%0A        this.position = position;%0A        requires(collectorSystem);%0A    %7D%0A%0A    // Called just before this Command runs the first time%0A    protected void initialize() %7B%0A        collectorSystem.armPickup(0.4);%0A    %7D%0A%0A    // Called repeatedly when this Command is scheduled to run%0A    protected void execute() %7B%0A         switch (position)%0A         %7B%0A            case 1:%0A                finalPosition = collectorSystem.RETRACT;%0A                break;%0A            case 2:%0A                finalPosition = collectorSystem.STORAGE;%0A                break;%0A            case 3:%0A                finalPosition = collectorSystem.EXTEND;%0A                break;%0A         %7D%0A        %0A         collectorSystem.setBar(finalPosition, ERROR);%0A         stop = true;%0A    %7D%0A%0A    // Make this return true when this Command no longer needs to run execute()%0A    protected boolean isFinished() %7B%0A        return stop;%0A    %7D%0A%0A    // Called once after isFinished returns true%0A    protected void end() %7B%0A        collectorSystem.armPickup(0.0);%0A        stop = false;%0A    %7D%0A%0A    // Called when another command which requires one or more of the same%0A    // subsystems is scheduled to run%0A    protected void interrupted() %7B%0A        end();%0A    %7D%0A%7D%0A

Move collector command.