Module grid

Grid class

Functions

new (id, serial, name, dev) constructor
add (dev) static callback when any grid device is added; user scripts can redefine
remove (dev) static callback when any grid device is removed; user scripts can redefine
led (x, y, val) set state of single LED on this grid device.
all (val) set state of all LEDs on this grid device.
refresh () update any dirty quads on this grid device.
connect (n) create device, returns object with handler and send.
cleanup () clear handlers.
update_devices () update devices.
norns.grid.key (id, x, y, s) redefine global grid key input handler


Functions

new (id, serial, name, dev)
constructor

Parameters:

  • id integer : arbitrary numeric identifier
  • serial string : serial
  • name string : name
  • dev userdata : opaque pointer to device
add (dev)
static callback when any grid device is added; user scripts can redefine

Parameters:

  • dev : a Grid table
remove (dev)
static callback when any grid device is removed; user scripts can redefine

Parameters:

  • dev : a Grid table
led (x, y, val)
set state of single LED on this grid device.

Parameters:

  • x integer : column index (1-based!)
  • y integer : row index (1-based!)
  • val integer : LED brightness in [0, 15]
all (val)
set state of all LEDs on this grid device.

Parameters:

  • val integer : LED brightness in [0, 15]
refresh ()
update any dirty quads on this grid device.
connect (n)
create device, returns object with handler and send.

Parameters:

  • n integer : vport index
cleanup ()
clear handlers.
update_devices ()
update devices.
norns.grid.key (id, x, y, s)
redefine global grid key input handler

Parameters:

  • id
  • x
  • y
  • s
generated by LDoc 1.4.6 Last updated 2019-11-14 23:40:48