PointRunnerLib.Matrix

class Matrix

Class to handle a single LED panel of arbitrary size.

Fields

buf

byte[][] buf

Display buffer for this LED panel. Data is written to the display buffer by the various draw/fill commands, then the contents of the buffer are pushed to the actual (physical) LED panel by the updatePanel() function.

channel

int channel

Channel index assigned to this LED panel

m_height

int m_height

Height of the LED panel

m_width

int m_width

Width of the LED panel

Constructors

Matrix

Matrix(int panel_width, int panel_height, int displayChannel)

Constructor for the Matrix class

Methods

DataTX

void DataTX()

Transmit the display buffer to the Point Runner over UDP so the content is displayed.

SetLength

void SetLength(int length)

Update the Point Runner with the size of the attached LED strip / panel.

Parameters:
  • length – Length of the LED strip / number of LEDs on the panel

changePixelColour

void changePixelColour(int pixel, int red, int green, int blue)

Changes the colour of a single pixel in the display buffer to the specified colour and applies gamma correction.

Parameters:
  • pixel – Index of the pixel to be updated
  • red – Red channel of the draw colour, in range [0,255]
  • green – Green channel of the draw colour, in range [0,255]
  • blue – Blue channel of the draw colour, in range [0,255]