Skip to content

Instantly share code, notes, and snippets.

@randomtestfive
Created October 16, 2018 20:14
Show Gist options
  • Save randomtestfive/1e88c2fcd7106cdcd3df5cb96942cf3b to your computer and use it in GitHub Desktop.
Save randomtestfive/1e88c2fcd7106cdcd3df5cb96942cf3b to your computer and use it in GitHub Desktop.
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