/* * Class: edu_wpi_first_wpilibj_hal_PowerJNI * Method: getUserVoltage6V * Signature: ()F */ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserVoltage6V (JNIEnv * env, jclass) { int32_t status = 0; float val = getUserVoltage6V(&status); CheckStatus(env, status); return val; }
/** * Get the voltage of the 6V rail * @return The controller 6V rail voltage value in Volts */ double ControllerPower::GetVoltage6V() { int32_t status = 0; double retVal = getUserVoltage6V(&status); wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status)); return retVal; }
/* * Class: edu_wpi_first_wpilibj_hal_PowerJNI * Method: getUserVoltage6V * Signature: (Ljava/nio/IntBuffer;)F */ JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserVoltage6V (JNIEnv * env, jclass, jobject status) { jint * statusPtr = (jint*)env->GetDirectBufferAddress(status); return getUserVoltage6V(statusPtr); }