/* * Class: edu_wpi_first_wpilibj_hal_PowerJNI * Method: getVinCurrent * Signature: ()F */ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getVinCurrent (JNIEnv * env, jclass) { int32_t status = 0; float val = getVinCurrent(&status); CheckStatus(env, status); return val; }
/** * Get the input current to the robot controller * @return The controller input current value in Amps */ double ControllerPower::GetInputCurrent() { int32_t status = 0; double retVal = getVinCurrent(&status); wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status)); return retVal; }
/* * Class: edu_wpi_first_wpilibj_hal_PowerJNI * Method: getVinCurrent * Signature: (Ljava/nio/IntBuffer;)F */ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getVinCurrent (JNIEnv * env, jclass, jobject status) { jint * statusPtr = (jint*)env->GetDirectBufferAddress(status); return getVinCurrent(statusPtr); }