mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add methods for checking Watchdog status, ds status, and brownout status
Change-Id: I723c87d0c50612cbffbb81b0e039efd0ef05fcd0
This commit is contained in:
@@ -535,6 +535,30 @@ JNIEXPORT jobject JNICALL Java_edu_wpi_first_wpilibj_communication_FRCNetworkCom
|
||||
return env->NewDirectByteBuffer(returnByteArray, 4);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_communication_FRCNetworkCommunicationsLibrary
|
||||
* Method: HALGetSystemActive
|
||||
* Signature: (Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_communication_FRCNetworkCommunicationsLibrary_HALGetSystemActive
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return HALGetSystemActive((int32_t*)statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_communication_FRCNetworkCommunicationsLibrary
|
||||
* Method: HALGetBrownedOut
|
||||
* Signature: (Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_communication_FRCNetworkCommunicationsLibrary_HALGetBrownedOut
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return HALGetBrownedOut((int32_t*)statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_communication_FRCNetworkCommunicationsLibrary
|
||||
* Method: HALSetErrorData
|
||||
|
||||
Reference in New Issue
Block a user