mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Artifact artf3925 : PCM : Can't find any user facing java/C++ API for getting/clearing PCM faults
Change-Id: If5cb5b08f685158c5317233c4d9bc8e688138df7
This commit is contained in:
@@ -89,3 +89,57 @@ JNIEXPORT jbyte JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getSolenoid
|
||||
|
||||
return getSolenoid(*solenoid_port_pointer, status_pointer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_SolenoidJNI
|
||||
* Method: getPCMSolenoidBlackList
|
||||
* Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;)B
|
||||
*/
|
||||
JNIEXPORT jbyte JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getPCMSolenoidBlackList
|
||||
(JNIEnv *env, jclass, jobject solenoid_port, jobject status)
|
||||
{
|
||||
|
||||
VoidPointer *solenoid_port_pointer = (VoidPointer *)env->GetDirectBufferAddress(solenoid_port);
|
||||
jint *status_pointer = (jint*)env->GetDirectBufferAddress(status);
|
||||
|
||||
return getPCMSolenoidBlackList(*solenoid_port_pointer, status_pointer);
|
||||
}
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_SolenoidJNI
|
||||
* Method: getPCMSolenoidVoltageStickyFault
|
||||
* Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getPCMSolenoidVoltageStickyFault
|
||||
(JNIEnv *env, jclass, jobject solenoid_port, jobject status)
|
||||
{
|
||||
VoidPointer *solenoid_port_pointer = (VoidPointer *)env->GetDirectBufferAddress(solenoid_port);
|
||||
jint *status_pointer = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
return getPCMSolenoidVoltageStickyFault(*solenoid_port_pointer, status_pointer);
|
||||
}
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_SolenoidJNI
|
||||
* Method: getPCMSolenoidVoltageFault
|
||||
* Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getPCMSolenoidVoltageFault
|
||||
(JNIEnv *env, jclass, jobject solenoid_port, jobject status)
|
||||
{
|
||||
VoidPointer *solenoid_port_pointer = (VoidPointer *)env->GetDirectBufferAddress(solenoid_port);
|
||||
jint *status_pointer = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
return getPCMSolenoidVoltageFault(*solenoid_port_pointer, status_pointer);
|
||||
}
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_SolenoidJNI
|
||||
* Method: clearAllPCMStickyFaults
|
||||
* Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_clearAllPCMStickyFaults
|
||||
(JNIEnv *env, jclass, jobject solenoid_port, jobject status)
|
||||
{
|
||||
VoidPointer *solenoid_port_pointer = (VoidPointer *)env->GetDirectBufferAddress(solenoid_port);
|
||||
jint *status_pointer = (jint *)env->GetDirectBufferAddress(status);
|
||||
|
||||
clearAllPCMStickyFaults_sol(*solenoid_port_pointer, status_pointer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user