Пример #1
0
/*
 * Class:     edu_wpi_first_wpilibj_hal_PowerJNI
 * Method:    getUserCurrentFaults3V3
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserCurrentFaults3V3
  (JNIEnv * env, jclass)
{
	int32_t status = 0;
	int val = getUserCurrentFaults3V3(&status);
  CheckStatus(env, status);
  return val;
}
Пример #2
0
/**
 * Get the count of the total current faults on the 3.3V rail since the
 * controller has booted
 * @return The number of faults
 */
int ControllerPower::GetFaultCount3V3() {
  int32_t status = 0;
  int retVal = getUserCurrentFaults3V3(&status);
  wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
  return retVal;
}
Пример #3
0
/*
 * 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);
}