mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Implement user API for roboRIO power methods (fixes artf3728 and artf3537)
Change-Id: I7501a83dcdd81d45b298e044379ea4ac3670c742
This commit is contained in:
@@ -50,6 +50,30 @@ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrent6
|
||||
return getUserCurrent6V(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserActive6V
|
||||
* Signature: (Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserActive6V
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserActive6V(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserCurrentFaults6V
|
||||
* Signature: (Ljava/nio/IntBuffer;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrentFaults6V
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserCurrentFaults6V(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserVoltage5V
|
||||
@@ -74,6 +98,30 @@ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrent5
|
||||
return getUserCurrent5V(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserActive5V
|
||||
* Signature: (Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserActive5V
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserActive5V(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserCurrentFaults5V
|
||||
* Signature: (Ljava/nio/IntBuffer;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrentFaults5V
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserCurrentFaults3V3(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserVoltage3V3
|
||||
@@ -97,3 +145,28 @@ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrent3
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserCurrent3V3(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserActive3V3
|
||||
* Signature: (Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserActive3V3
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserActive3V3(statusPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PowerJNI
|
||||
* Method: getUserCurrentFaults3V3
|
||||
* Signature: (Ljava/nio/IntBuffer;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrentFaults3V3
|
||||
(JNIEnv * env, jclass, jobject status)
|
||||
{
|
||||
jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
|
||||
return getUserCurrentFaults3V3(statusPtr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user