/* * Class: edu_wpi_first_wpilibj_hal_AnalogJNI * Method: setAccumulatorDeadband * Signature: (Ljava/nio/ByteBuffer;ILjava/nio/IntBuffer;)V */ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_AnalogJNI_setAccumulatorDeadband (JNIEnv * env, jclass, jobject id, jint deadband, jobject status) { void ** javaId = (void**)env->GetDirectBufferAddress(id); ANALOGJNI_LOG(logDEBUG) << "Analog Ptr = " << *javaId; jint * statusPtr = (jint*)env->GetDirectBufferAddress(status); setAccumulatorDeadband(*javaId, deadband, statusPtr); ANALOGJNI_LOG(logDEBUG) << "Status = " << *statusPtr; }
/** * Set the accumulator's deadband. * @param */ void AnalogInput::SetAccumulatorDeadband(int32_t deadband) { if (StatusIsFatal()) return; int32_t status = 0; setAccumulatorDeadband(m_port, deadband, &status); wpi_setErrorWithContext(status, getHALErrorMessage(status)); }