mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Support for the "USER" button on the RoboRIO
You can get the state of the USER button with GetUserButton() in C++ or Utility.getUserButton() in java. Change-Id: I923e62cab5e621ef43fed503acab5c0d751264fb
This commit is contained in:
@@ -116,6 +116,23 @@ JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_HALUtil_getFPGATime
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_HALUtil
|
||||
* Method: getFPGAButton
|
||||
* Signature: (Ljava/nio/IntBuffer;)I
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_HALUtil_getFPGAButton
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
//HALUTIL_LOG(logDEBUG) << "Calling HALUtil getFPGATime";
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
jboolean returnValue = getFPGAButton( statusPtr );
|
||||
//HALUTIL_LOG(logDEBUG) << "Status = " << *statusPtr;
|
||||
//HALUTIL_LOG(logDEBUG) << "FPGATime = " << returnValue;
|
||||
return returnValue;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_HALUtil
|
||||
* Method: getHALErrorMessage
|
||||
|
||||
Reference in New Issue
Block a user