From 7d3e4ddba9c66e0bede79ee2c92f4f40c726ce74 Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Mon, 1 Jan 2024 11:53:21 -0800 Subject: [PATCH] [docs] Add warning about using user button to docs (NFC) (#6129) --- hal/src/main/java/edu/wpi/first/hal/HALUtil.java | 4 ++++ hal/src/main/native/include/hal/HALBase.h | 4 ++++ wpilibc/src/main/native/include/frc/RobotController.h | 4 ++++ .../src/main/java/edu/wpi/first/wpilibj/RobotController.java | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/hal/src/main/java/edu/wpi/first/hal/HALUtil.java b/hal/src/main/java/edu/wpi/first/hal/HALUtil.java index 11d9b4d74a..0cadf3914c 100644 --- a/hal/src/main/java/edu/wpi/first/hal/HALUtil.java +++ b/hal/src/main/java/edu/wpi/first/hal/HALUtil.java @@ -90,6 +90,10 @@ public final class HALUtil extends JNIWrapper { /** * Gets the state of the "USER" button on the roboRIO. * + *

Warning: the User Button is used to stop user programs from automatically loading if it is + * held for more then 5 seconds. Because of this, it's not recommended to be used by teams for any + * other purpose. + * * @return true if the button is currently pressed down * @see "HAL_GetFPGAButton" */ diff --git a/hal/src/main/native/include/hal/HALBase.h b/hal/src/main/native/include/hal/HALBase.h index dd7bb704b9..3e9ddc67d1 100644 --- a/hal/src/main/native/include/hal/HALBase.h +++ b/hal/src/main/native/include/hal/HALBase.h @@ -110,6 +110,10 @@ HAL_RuntimeType HAL_GetRuntimeType(void); /** * Gets the state of the "USER" button on the roboRIO. * + * @warning the User Button is used to stop user programs from automatically + * loading if it is held for more then 5 seconds. Because of this, it's not + * recommended to be used by teams for any other purpose. + * * @param[out] status the error code, or 0 for success * @return true if the button is currently pressed down */ diff --git a/wpilibc/src/main/native/include/frc/RobotController.h b/wpilibc/src/main/native/include/frc/RobotController.h index 0e7a466501..5d8ddfb4de 100644 --- a/wpilibc/src/main/native/include/frc/RobotController.h +++ b/wpilibc/src/main/native/include/frc/RobotController.h @@ -83,6 +83,10 @@ class RobotController { /** * Get the state of the "USER" button on the roboRIO. * + * @warning the User Button is used to stop user programs from automatically + * loading if it is held for more then 5 seconds. Because of this, it's not + * recommended to be used by teams for any other purpose. + * * @return True if the button is currently pressed down */ static bool GetUserButton(); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java index 3e25ce6dc9..d8faafa6d3 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java @@ -79,6 +79,10 @@ public final class RobotController { /** * Get the state of the "USER" button on the roboRIO. * + *

Warning: the User Button is used to stop user programs from automatically loading if it is + * held for more then 5 seconds. Because of this, it's not recommended to be used by teams for any + * other purpose. + * * @return true if the button is currently pressed down */ public static boolean getUserButton() {