Skip to content

Commit

Permalink
Added comment to Gamepad library
Browse files Browse the repository at this point in the history
  • Loading branch information
briansemrau committed Feb 11, 2018
1 parent 8c9a092 commit 8f0f17d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/org/usfirst/frc/team4737/lib/Gamepad.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ public DPad(Gamepad gamepad, String name, int id) {
new DPadButton[] { UP, UP_LEFT, UP_RIGHT });
}

/**
* Get the angle in degrees of the DPad.
*
* <p>The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90,
* upper-left is 315).
*
* @return the angle of the POV in degrees, or -1 if the POV is not pressed.
*/
public int getDegree() {
return gamepad.gamepad.getPOV(id);
}
Expand Down Expand Up @@ -306,7 +314,7 @@ public Axis getAxis(String name) {
* being used.
*
* @param name
* - The name of the thumbstick (usually just <code>"LS"</code> or
* The name of the thumbstick (usually just <code>"LS"</code> or
* <code>"RS"</code>)
* @return Returns a thumbstick mapped with the given name
*/
Expand All @@ -319,7 +327,7 @@ public Thumbstick getThumbstick(String name) {
* being used.
*
* @param name
* - The name of the DPad (usually just <code>"DPAD"</code>)
* The name of the DPad (usually just <code>"DPAD"</code>)
* @return Returns a button mapped with the given name
*/
public DPad getDPad(String name) {
Expand Down

0 comments on commit 8f0f17d

Please sign in to comment.