/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.badrobots.y2012.technetium.buttons;

import com.badrobots.y2012.technetium.OI;
import com.badrobots.y2012.technetium.commands.Balance;
import com.badrobots.y2012.technetium.commands.GatherBallsAndAutoShoot;
import com.badrobots.y2012.technetium.commands.GatherBallsAndManualShoot;
import edu.wpi.first.wpilibj.buttons.Button;

/**
 *
 * @author Jon Buckley
 */
public class TrackingButton extends Button
{
//NEEDS TESTING
    public TrackingButton()
    {
        
        super.whenPressed(new GatherBallsAndAutoShoot());
    }

    public boolean get()
    {
        if (OI.secondXboxBButton())
            return true;
        new GatherBallsAndManualShoot();
        return false;
    }


}

@@ -511,16 +511,42 @@
 utton%0A%7B%0A
+    boolean once = false;%0A
 //NEEDS 
@@ -740,65 +740,177 @@
     
-    return true;%0A        new GatherBallsAndManualShoot();
+%7B%0A            once = true;%0A            return true;%0A        %7D%0A        if(once)%0A        %7B%0A            new GatherBallsAndManualShoot();%0A            once = false;%0A        %7D
 %0A   

Fix to trackingbutton