Skip to content

Commit

Permalink
[Doc] Add warning about using user button to docs (NFC)
Browse files Browse the repository at this point in the history
Fixes #5165
  • Loading branch information
sciencewhiz committed Jan 1, 2024
1 parent 938bf45 commit c916986
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hal/src/main/java/edu/wpi/first/hal/HALUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public final class HALUtil extends JNIWrapper {
/**
* Reads the microsecond-resolution timer on the FPGA.
*
* 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 The current time in microseconds according to the FPGA (since FPGA reset).
*/
public static native long getFPGATime();
Expand Down
4 changes: 4 additions & 0 deletions hal/src/main/native/include/hal/HALBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
4 changes: 4 additions & 0 deletions wpilibc/src/main/native/include/frc/RobotController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public static long getFPGATime() {
/**
* 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() {
Expand Down

0 comments on commit c916986

Please sign in to comment.