bool CryVR_WiimoteManagerPlugin::SetAccelThreshold( int ii, float angle ) { threshold = ii; angle_threshold = angle; if ( init && found > 0 ) { int i = 0; for ( ; i < MAX_WIIMOTES; ++i ) { wiiuse_set_accel_threshold( wiimotes[i], ii ); wiiuse_set_nunchuk_accel_threshold( wiimotes[i], ii ); wiiuse_set_orient_threshold( wiimotes[i], angle_threshold ); wiiuse_set_nunchuk_orient_threshold( wiimotes[i], angle_threshold ); } return true; } return false; }
/** * Set how much acceleration must change to generate an event. * @param id id of the wiimote concerned * @param val minimum value detected by an event */ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAccelThreshold (JNIEnv *env, jobject obj, jint id, jint val) { wiiuse_set_accel_threshold(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), val); }
void Wiimote::setAccelThreshold(int threshold) { wiiuse_set_accel_threshold(this->wm, threshold); }