Class arc

Arc class

Functions

arc.add (dev) static callback when any arc device is added.
arc.remove (dev) static callback when any arc device is removed.
arc.connect (n) create device, returns object with handler and send
arc.cleanup () clear handlers

Methods

arc:new (id, serial, name, dev) constructor.
arc:led (ring, x, val) set state of single LED on this arc device.
arc:all (val) set state of all LEDs on this arc device.
arc:refresh () update any dirty quads on this arc device.
arc:segment (ring, from, to, level) create an anti-aliased point to point arc segment/range on a sepcific LED ring.


Functions

arc.add (dev)
static callback when any arc device is added. user scripts can redefine.

Parameters:

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

Parameters:

  • dev : a Arc table
arc.connect (n)
create device, returns object with handler and send

Parameters:

  • n
arc.cleanup ()
clear handlers

Methods

arc:new (id, serial, name, dev)
constructor.

Parameters:

  • id integer : arbitrary numeric identifier
  • serial string : serial
  • name string : name
  • dev userdata : opaque pointer to device
arc: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]
arc:all (val)
set state of all LEDs on this arc device.

Parameters:

  • val integer : LED brightness in [0, 15]
arc:refresh ()
update any dirty quads on this arc device.
arc: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]
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19