本文整理汇总了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);
}