
44
Returns the number of sensors. Currently it is fixed at 18, but future driver
releases may differ.
Parameters
pFG
Pointer to a glove device. This is the value returned by
fdOpen()
.
Remarks
Although the 5-sensor glove can measure only average flexure, the driver will
attempt to fill in missing values. The number of sensors returned can therefore
be of a higher dimension. The enumerated type
EfdSensors
defines the
finger mapping for each sensor.
void fdGetSensorRawAll(fdGlove *pFG, unsigned short *pData)
Obtains the most recent raw sensor values from the currently connected glove.
Return value
None.
Parameters
pFG
Pointer to a glove device. This is the value returned by
fdOpen()
.
pData
Pointer to an array of 16-bit integers that will contain the raw sensor values. The
size of the array must always match the value returned by
fdGetNumSensors()
.
Remarks
Currently the raw sensor samples are all 12 bit unsigned values. The range is
therefore from 0 to 4095. Note that this is not the dynamic range of the sensors.
There can be severe offset values associated with each sensor. The
enumerated type
EfdSensors
defines the finger mapping for each sensor.
unsigned short fdGetSensorRaw(fdGlove *pFG, int nSensor)
Obtains the most recent raw sensor value for a specific sensor from the
currently connected glove.
Return value
Returns a 16-bit integer. See
fdGetSensorRawAll()
for details.
Parameters
pFG
Pointer to a glove device. This is the value returned by
fdOpen()
.
nSensor
Index of the sensor that is being set. The value must lie in the range given by
the enumerated type
EfdSensors
, or alternatively from zero to the value
returned by
fdGetNumSensors()
minus one.
Remarks