/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.plasmarobotics.jim.controls;

import edu.wpi.first.wpilibj.Joystick;

/**
 *
 * @author Allek
 */
public class PlasmaGamepad extends Joystick {
    
    private ToggleableButton aButton = new ToggleableButton(this, 1),
            bButton = new ToggleableButton(this, 2),
            xButton = new ToggleableButton(this, 3),
            yButton = new ToggleableButton(this, 4),
            leftBumper = new ToggleableButton(this, 5),
            rightBumper = new ToggleableButton(this, 6),
            backButton = new ToggleableButton(this, 7),
            startButton = new ToggleableButton(this, 8),
            leftJoystickButton = new ToggleableButton(this, 9),
            rightJoystickButton = new ToggleableButton(this, 10);
            
    
    public PlasmaGamepad(int port) {
        super(port);
    }
    
    public ToggleableButton getAButton() {
        return this.aButton;
    }
    public ToggleableButton getBButton() {
        return this.bButton;
    }
    public ToggleableButton getXButton() {
        return this.xButton;
    }
    public ToggleableButton getYButton() {
        return this.yButton;
    }
    public ToggleableButton getLeftBumper() {
        return this.leftBumper;
    }
    public ToggleableButton getRightBumper() {
        return this.rightBumper;
    }
    public ToggleableButton getBackButton() {
        return this.backButton;
    }
    public ToggleableButton getStartButton() {
        return this.startButton;
    }
    public ToggleableButton getLeftJoystickButton() {
        return this.leftJoystickButton;
    }
    public ToggleableButton getRightJoystickButton() {
        return this.rightJoystickButton;
    }
    
    public double getLeftJoystickXAxis() {
        return super.getRawAxis(1);
    }
    public double getLeftJoystickYAxis() {
        return super.getRawAxis(2);
    }
    public double getRightJoystickXAxis() {
        return super.getRawAxis(4);
    }
    public double getRightJoystickYAxis() {
        return super.getRawAxis(5);
    }
    public double getTriggerAxis() {
        return super.getRawAxis(3);
    }
}

@@ -942,38 +942,32 @@
 (port);%0D%0A    %7D%0D%0A
-    %0D%0A
     public Toggl
@@ -1618,32 +1618,105 @@
 Button;%0D%0A    %7D%0D%0A
+    /**%0D%0A     * Get left joystick button (pressed in or not).%0D%0A     **/%0D%0A
     public Toggl
@@ -1794,32 +1794,106 @@
 Button;%0D%0A    %7D%0D%0A
+    /**%0D%0A     * Get right joystick button (pressed in or not).%0D%0A     **/%0D%0A
     public Toggl
@@ -1995,356 +1995,911 @@
     
-public double getLeftJoystickXAxis() %7B%0D%0A        return super.getRawAxis(1);%0D%0A    %7D%0D%0A    public double getLeftJoystickYAxis() %7B%0D%0A        return super.getRawAxis(2);%0D%0A    %7D%0D%0A    public double getRightJoystickXAxis() %7B%0D%0A        return super.getRawAxis(4);%0D%0A    %7D%0D%0A    public double getRightJoystickYAxis() %7B%0D%0A        return super.getRawAxis(5);%0D%0A    %7D
+/**%0D%0A     * Get left joystick x-axis (left-right).%0D%0A     * Full left = -1, full right = +1.%0D%0A     **/%0D%0A    public double getLeftJoystickXAxis() %7B%0D%0A        return super.getRawAxis(1);%0D%0A    %7D%0D%0A    /**%0D%0A     * Get left joystick y-axis (up-down).%0D%0A     * Full up = -1, full down = +1.%0D%0A     **/%0D%0A    public double getLeftJoystickYAxis() %7B%0D%0A        return super.getRawAxis(2);%0D%0A    %7D%0D%0A    /**%0D%0A     * Get right joystick x-axis (left-right).%0D%0A     * Full left = -1, full right = +1.%0D%0A     **/%0D%0A    public double getRightJoystickXAxis() %7B%0D%0A        return super.getRawAxis(4);%0D%0A    %7D%0D%0A    /**%0D%0A     * Get right joystick y-axis (up-down).%0D%0A     * Full up = -1, full down = +1.%0D%0A     **/%0D%0A    public double getRightJoystickYAxis() %7B%0D%0A        return super.getRawAxis(5);%0D%0A    %7D%0D%0A    /**%0D%0A     * Get trigger axis.%0D%0A     * Right depressed -%3E -1%0D%0A     * Left depressed -%3E +1%0D%0A     * Both fully depressed = 0%0D%0A     **/
 %0D%0A  

Add some JavaDocing to gamepad