Hardware Events

Whenever main.bin calls your handle_event() function, its argument is always a Lua table.

This Lua table always has the key called "type" whose value is one of the following strings:

Button Events

"button_down"

One of the watch buttons was pressed. This event has additional parameter called "button" whose integer value (0 to 4) specifies the button.

"button_down"

One of the buttons was released. This event has additional parameter called "button" whose integer value (0 to 4) specifies the button.

"button_hold"

One of the buttons was held down for about a second and not yet released. This event has additional parameter called "button" whose integer value (0 to 4) specifies the button.

Timer Events

"timer_fired"

One of the defined timers has just expired. This event has additional parameter called "handle" which is a unique identifier of this event. See the "timer" section of Dynawa Lua API for more details.

Note that, in reality, your handle_event() function may receive the "timer_fired" event significantly later than it actually fired (because you must first handle all events generated and queued before it).

Bluetooth Events

"bluetooth"

Incoming BT event. Has a "subtype" key whose value specifies the type of Bluetooth information/data. TODO
Comments