示例#1
0
/*
 * Class:     edu_wpi_first_wpilibj_hal_PowerJNI
 * Method:    getUserActive6V
 * Signature: ()Z
 */
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserActive6V
  (JNIEnv * env, jclass)
{
	int32_t status = 0;
	bool val = getUserActive6V(&status);
  CheckStatus(env, status);
  return val;
}
示例#2
0
/**
 * Get the enabled state of the 6V rail. The rail may be disabled due to a
 * controller
 * brownout, a short circuit on the rail, or controller over-voltage
 * @return The controller 6V rail enabled value. True for enabled.
 */
bool ControllerPower::GetEnabled6V() {
  int32_t status = 0;
  bool retVal = getUserActive6V(&status);
  wpi_setGlobalErrorWithContext(status, getHALErrorMessage(status));
  return retVal;
}
示例#3
0
/*
 * Class:     edu_wpi_first_wpilibj_hal_PowerJNI
 * Method:    getUserActive6V
 * Signature: (Ljava/nio/IntBuffer;)Z
 */
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_PowerJNI_getUserActive6V
  (JNIEnv * env, jclass, jobject status)
{
	jint * statusPtr = (jint*)env->GetDirectBufferAddress(status);
	return getUserActive6V(statusPtr);
}