This repository was archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Valeri edited this page Aug 28, 2019
·
4 revisions
Welcome to the lua-xwiimote wiki! It is used to host documentation for this library.
Flow of usual application using lua-xwiimote library looks like this:
-
requirethis library - Enumerate connected WiiMotes using
wii.monitor - Open those you need as
wii.iface - (Optional) Check available interfaces with
iface:available()and/or read static data - Open on them interfaces using
iface:open() - (Optional) Obtain file descriptors for using with side library porting
pollsyscall, likeGio.UnixInputStreamfrom lgi orpollfrom luaposix withiface:get_fd() - Check for incoming events using
for ev in iface:iter() do
-- Handle event
endeither constantly or when file descriptor from step 6 reports itself as readable.
Examples page have the list of included examples with some comments on them.
- "Standard
assert-compatible notation" —trueor value on success,falseand string message on error. It's generally used on recoverable/non-fatal errors.