Created
October 16, 2018 20:14
-
-
Save randomtestfive/1e88c2fcd7106cdcd3df5cb96942cf3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.redalert1741.robotbase.input; | |
import edu.wpi.first.wpilibj.GenericHID; | |
public class Guitar extends GenericHID { | |
public Guitar(int port) { | |
super(port); | |
} | |
@Override | |
public double getX(Hand hand) { | |
return getRawAxis(0); | |
} | |
@Override | |
public double getY(Hand hand) { | |
return getRawAxis(1); | |
} | |
public double getWhammy() { | |
return getRawAxis(2); | |
} | |
public boolean getGreen() { | |
return getRawButton(0); | |
} | |
public boolean getRed() { | |
return getRawButton(1); | |
} | |
public boolean getYellow() { | |
return getRawButton(2); | |
} | |
public boolean getBlue() { | |
return getRawButton(3); | |
} | |
public boolean getOrange() { | |
return getRawButton(4); | |
} | |
public boolean getStrumUp() { | |
return getRawButton(5); | |
} | |
public boolean getStrumDown() { | |
return getRawButton(6); | |
} | |
public boolean getStrum() { | |
return getStrumUp() || getStrumDown(); | |
} | |
public boolean getPlus() { | |
return getRawButton(7); | |
} | |
public boolean getMinus() { | |
return getRawButton(8); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment