From 1e14403b3bceff788a7842116423789750c4db4e Mon Sep 17 00:00:00 2001 From: Joe Ross Date: Sat, 19 Mar 2016 13:51:42 -0700 Subject: [PATCH] Update POV documentation with examples of POV angles Change-Id: If0f5b75366785b94a97b02694667fc00f8bfe196 --- wpilibc/Athena/src/Joystick.cpp | 5 ++++- wpilibj/src/athena/java/edu/wpi/first/wpilibj/Joystick.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wpilibc/Athena/src/Joystick.cpp b/wpilibc/Athena/src/Joystick.cpp index 0a5b62361e..0e928cd4d9 100644 --- a/wpilibc/Athena/src/Joystick.cpp +++ b/wpilibc/Athena/src/Joystick.cpp @@ -206,7 +206,10 @@ bool Joystick::GetRawButton(uint32_t button) const { } /** - * Get the state of a POV on the joystick. + * Get the angle in degrees of a POV on the joystick. + * + * The POV angles start at 0 in the up direction, and increase + * clockwise (eg right is 90, upper-left is 315). * * @param pov The index of the POV to read (starting at 0) * @return the angle of the POV in degrees, or -1 if the POV is not pressed. diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Joystick.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Joystick.java index 216937c727..e139ef9dfc 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Joystick.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Joystick.java @@ -332,7 +332,10 @@ public class Joystick extends GenericHID { } /** - * Get the state of a POV on the joystick. + * Get the angle in degrees of a POV on the joystick. + * + * The POV angles start at 0 in the up direction, and increase + * clockwise (eg right is 90, upper-left is 315). * * @param pov The index of the POV to read (starting at 0) * @return the angle of the POV in degrees, or -1 if the POV is not pressed.