This repository has been 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:
-
require
this 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
poll
syscall, likeGio.UnixInputStream
from lgi orpoll
from luaposix withiface:get_fd()
- Check for incoming events using
for ev in iface:iter() do
-- Handle event
end
either 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" —true
or value on success,false
and string message on error. It's generally used on recoverable/non-fatal errors.