本文整理匯總了C++中CheckCTRStatus函數的典型用法代碼示例。如果您正苦於以下問題:C++ CheckCTRStatus函數的具體用法?C++ CheckCTRStatus怎麽用?C++ CheckCTRStatus使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CheckCTRStatus函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: CheckCTRStatus
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_CanTalonJNI_GetAppliedThrottle
(JNIEnv * env, jclass, jlong handle)
{
int retval;
CTR_Code status = ((CanTalonSRX*)handle)->GetAppliedThrottle(retval);
CheckCTRStatus(env, status);
return retval;
}
示例2: CheckCTRStatus
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_CanTalonJNI_GetPulseWidthVelocity
(JNIEnv * env, jclass, jlong handle)
{
int retval;
CTR_Code status = ((CanTalonSRX*)handle)->GetPulseWidthVelocity(retval);
CheckCTRStatus(env, status);
return retval;
}
示例3:
/*
* Class: edu_wpi_first_wpilibj_hal_CanTalonJNI
* Method: GetMotionProfileStatus
* Signature: (JLedu/wpi/first/wpilibj/CANTalon;Ledu/wpi/first/wpilibj/CANTalon/MotionProfileStatus;)V
*/
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CanTalonJNI_GetMotionProfileStatus
(JNIEnv *env, jclass, jlong handle, jobject canTalon, jobject motionProfileStatus)
{
static jmethodID setMotionProfileStatusFromJNI = nullptr;
if (!setMotionProfileStatusFromJNI) {
jclass cls = env->GetObjectClass(canTalon);
setMotionProfileStatusFromJNI = env->GetMethodID(cls, "setMotionProfileStatusFromJNI", "(Ledu/wpi/first/wpilibj/CANTalon$MotionProfileStatus;IIIIIIII)V");
if (!setMotionProfileStatusFromJNI) return;
}
uint32_t flags;
uint32_t profileSlotSelect;
int32_t targPos;
int32_t targVel;
uint32_t topBufferRem;
uint32_t topBufferCnt;
uint32_t btmBufferCnt;
uint32_t outputEnable;
CTR_Code status = ((CanTalonSRX*)handle)->GetMotionProfileStatus(flags, profileSlotSelect, targPos, targVel, topBufferRem, topBufferCnt, btmBufferCnt, outputEnable);
if (!CheckCTRStatus(env, status)) return;
env->CallVoidMethod(canTalon, setMotionProfileStatusFromJNI, motionProfileStatus, (jint)flags, (jint)profileSlotSelect, (jint)targPos, (jint)targVel, (jint)topBufferRem, (jint)topBufferCnt, (jint)btmBufferCnt, (jint)outputEnable);
}
示例4: CheckCTRStatus
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CanTalonJNI_SetProfileSlotSelect
(JNIEnv * env, jclass, jlong handle, jint param)
{
CTR_Code status = ((CanTalonSRX*)handle)->SetProfileSlotSelect(param);
CheckCTRStatus(env, status);
}