int giiQueryValInfo(gii_input_t*inp, uint32 origin,
Though when using GII inputs the exact type of device is fully
transparent to the program, information about the device that
is actually attached to a given gii input and origin id can be
queried, e.g. for configuration interfaces.
For giiQueryValInfo is used on devices, where
has indicated that the device has one or more valuator axes and you
want to gather additional info about the physical equivalent of
each axis.The parameters inp and
select the input to query
and valnumber selects the specific valuator
(an input can have
The queried data is put into info, which has the
Number of the queried valuator.
Name of the device (string, 74+\0 chars max)
Abbreviated devicename (string, 4+\0 chars max)
struct with sint32min,center, max;
Contains the minimum, center and maximum values for this
valuator. Note, that this range may change on some
devices due to calibration, but it is usually not
expected that a device recalibrates while in use.
You should react gracefully to values received from
the valuator that are outside the specified range,
gives the physical quantity the device
measures. The idea is to report the thing the user
actually controls. I.e. a Joystick actually measures
resistance, but should report GII_PT_ANGLE or
GII_PT_FORCE, as that is what the user does to the
stick and what results in the changed resistance.
Using these values, it is possible to give calibration
data to the application. In gii.h there is a base unit
(according to SI) specified for each phystype.
The SI value can be computed using these values
and the following formula (unless SI_mul is 0, which
means the device is non-linear or the factor is unknown).
SI = (float) (SI_add + value[n]) * (float) SI_mul
/ (float) SI_div * pow(2.0, SI_shift);
Returns 0 on success (info is valid, then) or