/* * Class: edu_wpi_first_wpilibj_hal_PowerJNI * Method: getUserCurrentFaults6V * Signature: ()I */ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrentFaults6V (JNIEnv * env, jclass) { int32_t status = 0; int val = getUserCurrentFaults6V(&status); CheckStatus(env, status); return val; }
/** * Get the count of the total current faults on the 6V rail since the controller * has booted * @return The number of faults. */ int ControllerPower::GetFaultCount6V() { int32_t status = 0; int retVal = getUserCurrentFaults6V(&status); wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status)); return retVal; }
/* * 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); }