Module arc

Arc class

Functions

new (id, serial, name, dev) constructor.
add (dev) static callback when any arc device is added.
remove (dev) static callback when any arc device is removed.
led (ring, x, val) set state of single LED on this arc device.
all (val) set state of all LEDs on this arc device.
refresh () update any dirty quads on this arc device.
segment (ring, from, to, level) create an anti-aliased point to point arc segment/range on a sepcific LED ring.
connect (n) create device, returns object with handler and send
cleanup () clear handlers


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 arc device is added. user scripts can redefine.

Parameters:

  • dev : a Arc table
remove (dev)
static callback when any arc device is removed. user scripts can redefine.

Parameters:

  • dev : a Arc table
led (ring, x, val)
set state of single LED on this arc device.

Parameters:

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

Parameters:

  • val integer : LED brightness in [0, 15]
refresh ()
update any dirty quads on this arc device.
segment (ring, from, to, level)
create an anti-aliased point to point arc segment/range on a sepcific LED ring. each point can be a decimal, LEDs will fade for in between values.

Parameters:

  • ring integer : ring index (1-based)
  • from number : from angle in radians
  • to number : to angle in radians
  • level integer : LED brightness in [0, 15]
connect (n)
create device, returns object with handler and send

Parameters:

  • n
cleanup ()
clear handlers
generated by LDoc 1.4.6 Last updated 2019-11-14 23:40:48