Implement user API for roboRIO power methods (fixes artf3728 and artf3537)

Change-Id: I7501a83dcdd81d45b298e044379ea4ac3670c742
This commit is contained in:
Kevin O'Connor
2014-11-10 13:15:33 -05:00
parent 747cdc8a58
commit 3ad31dd4d7
8 changed files with 479 additions and 0 deletions

View File

@@ -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);
}