cock.explodeCapturedData

Converts "longdata" string passed to the controlcaptured callback into meaningful data.

Function

Synopsis

map, option, device, key, inverse, value, joystick = cock.explodeCapturedData ( longdata )

Arguments

string longdata
Data from controlcaptured callback.

Returns

string map
Map requested for capturing.
string option
Option requested for capturing.
number device
Captured device number.
number key
Captured key number. May be a string depending on the device.
number inverse
Captued inversion mode. Axis-like devices tilted to opposite direction yield negative modes.
number value
Exact value of the input readings in the moment of capture.
number joystick
Internal joystick number. Will be 1 for all non-joystick devices.

Remarks

The function doesn't return delta mode because it's impossible to capture it. You can always assume that delta mode is "bypass", or override it whereever that's appropriate.

See also


Personal tools