|
FreeJ scripting | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--Controller
|
+--WiiController
This documentation and the Wii is still under construction.However, this controller is already working.
The WiiController connects via bluetooth to a Nintendo wii remote controller.
| Constructor Summary | |
WiiController(<string> outdevice)
Nintendo Wii remote control. |
|
| Method Summary | |
bool callback
|
acceleration(<int> x, <int> y, <int> z)
Callback on accelleration changes |
bool
|
connect(<string> bdaddr)
Connect to wii. |
void
|
toggle_accel(<bool> state)
toggle acceleration data on/off |
void
|
toggle_buttons(<bool> state)
toggle button data on/off |
void
|
toggle_led(<int> state)
toggle led on/off |
void
|
toggle_rumble(<bool> state)
toggle rumble on/off |
| Methods inherited from class Controller |
activate, get_name
|
| Constructor Detail |
WiiController(<string> outdevice)
The WiiController constructor creates a controller which holds the callbacks. There's an example script "wiimote.js".
outdevice - IDEA/TODO(?) select bluetooth host device, e.g. 'hci0', 'hci1'
| Method Detail |
bool callback acceleration(<int> x, <int> y, <int> z)
x - current x-axis value
y - current y-axis value
z - current z-axis value
bool connect(<string> bdaddr)
bdaddr - (optional) wii remote device address, e.g. '00:19:1D:66:91:D3' Leave empty to scan and connect to any wii.
void toggle_accel(<bool> state)
state - switch acceleration datastream. off by default.
void toggle_buttons(<bool> state)
state - switch button datastream. on by default.
void toggle_led(<int> state)
state - bitmask state TODO: FIXME
void toggle_rumble(<bool> state)
state - switch rumble
|
FreeJ scripting | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
FreeJ scripting documentation is Copyleft (C) 2000 - 2007 dyne.org foundation. Verbatim copying and distribution of this entire page is permitted in any medium, provided this notice is preserved.