mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
added PDP methods to javalib
Change-Id: I60f3f615b01dba6e05721c78ba890859c7c9f027
This commit is contained in:
@@ -40,3 +40,68 @@ JNIEXPORT jdouble JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_getPDPChannelCur
|
||||
return getPDPChannelCurrent(channel, status_ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PDPJNI
|
||||
* Method: getPDPTotalCurrent
|
||||
* Signature: (BLjava/nio/IntBuffer;)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_getPDPTotalCurrent
|
||||
(JNIEnv *env, jclass, jobject status)
|
||||
{
|
||||
jint *status_ptr = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
return getPDPTotalCurrent(status_ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PDPJNI
|
||||
* Method: getPDPTotalPower
|
||||
* Signature: (BLjava/nio/IntBuffer;)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_getPDPTotalPower
|
||||
(JNIEnv *env, jclass, jobject status)
|
||||
{
|
||||
jint *status_ptr = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
return getPDPTotalPower(status_ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PDPJNI
|
||||
* Method: resetPDPTotalEnergy
|
||||
* Signature: (BLjava/nio/IntBuffer;)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_getPDPTotalEnergy
|
||||
(JNIEnv *env, jclass, jobject status)
|
||||
{
|
||||
jint *status_ptr = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
return getPDPTotalEnergy(status_ptr);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PDPJNI
|
||||
* Method: resetPDPTotalEnergy
|
||||
* Signature: (BLjava/nio/IntBuffer;)D
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_resetPDPTotalEnergy
|
||||
(JNIEnv *env, jclass, jobject status)
|
||||
{
|
||||
jint *status_ptr = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
resetPDPTotalEnergy(status_ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_PDPJNI
|
||||
* Method: clearStickyFaults
|
||||
* Signature: (BLjava/nio/IntBuffer;)D
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_clearPDPStickyFaults
|
||||
(JNIEnv *env, jclass, jobject status)
|
||||
{
|
||||
jint *status_ptr = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
clearPDPStickyFaults(status_ptr);
|
||||
}
|
||||
Reference in New Issue
Block a user