EVT_joySetCenter

Calibrates the joystick center position

Declaration

void EVTAPI EVT_joySetCenter(void)

Prototype In

event.h

Description

This function can be used to zero in on better joystick calibration factors, which may work better than the default simplistic calibration (which assumes the joystick is centered when the event library is initialised). To use this function, ask the user to hold the stick in the center position and then have them press a key or button. and then call this function. This function will then read the joystick and update the calibration factors.

Usually, assuming that the stick was centered when the event library was initialized, you really only need to call EVT_joySetLowerRight since the upper left position is usually always 0,0 on most joysticks. However, the safest procedure is to call all three calibration functions.

See Also

EVT_joySetUpperLeft, EVT_joySetLowerRight, EVT_joySetCenter

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com