From 8f0f17dd4ba472b0f5c7357b6790f5cabf9acd80 Mon Sep 17 00:00:00 2001 From: Brian Semrau Date: Sun, 11 Feb 2018 01:57:25 -0500 Subject: [PATCH] Added comment to Gamepad library --- src/org/usfirst/frc/team4737/lib/Gamepad.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/org/usfirst/frc/team4737/lib/Gamepad.java b/src/org/usfirst/frc/team4737/lib/Gamepad.java index 495f93b..607677a 100644 --- a/src/org/usfirst/frc/team4737/lib/Gamepad.java +++ b/src/org/usfirst/frc/team4737/lib/Gamepad.java @@ -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. + * + *

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); } @@ -306,7 +314,7 @@ public Axis getAxis(String name) { * being used. * * @param name - * - The name of the thumbstick (usually just "LS" or + * The name of the thumbstick (usually just "LS" or * "RS") * @return Returns a thumbstick mapped with the given name */ @@ -319,7 +327,7 @@ public Thumbstick getThumbstick(String name) { * being used. * * @param name - * - The name of the DPad (usually just "DPAD") + * The name of the DPad (usually just "DPAD") * @return Returns a button mapped with the given name */ public DPad getDPad(String name) {