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;
}
Esempio n. 2
0
/**
 * 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);
}
Esempio n. 3
0
void Wiimote::setAccelThreshold(int threshold)
{
    wiiuse_set_accel_threshold(this->wm, threshold);
}