13 matrix.addLayer(&backgroundLayer);
15 matrix.setRefreshRate(240);
17 backgroundLayer.swapBuffers();
28 for (uint16_t y = 0; y < 32; y++) {
29 for (uint16_t x = 0; x < 64; x++){
30 uint16_t pixelNum = y * 64 + x;
32 rgb24 rgbColorLeft = rgb24((uint16_t)camPixelsLeft->
GetColor(pixelNum)->
R, (uint16_t)camPixelsLeft->
GetColor(pixelNum)->
G, (uint16_t)camPixelsLeft->
GetColor(pixelNum)->
B);
33 rgb24 rgbColorRight = rgb24((uint16_t)camPixelsRight->
GetColor(pixelNum)->
R, (uint16_t)camPixelsRight->
GetColor(pixelNum)->
G, (uint16_t)camPixelsRight->
GetColor(pixelNum)->
B);
35 backgroundLayer.drawPixel(63 - x, (31 - y), rgbColorLeft);
36 backgroundLayer.drawPixel(x, (y) + 32, rgbColorRight);
40 backgroundLayer.swapBuffers(
false);
SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions)
SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions)
SMARTMATRIX_APA_ALLOCATE_BUFFERS(apamatrix, kApaMatrixWidth, kApaMatrixHeight, kApaRefreshDepth, kApaDmaBufferRows, kApaPanelType, kApaMatrixOptions)
Declares the HUB75ControllerSquare class for managing a square display using two vertical HUB75 panel...
const uint8_t kApaBackgroundLayerOptions
Background layer options for APA matrices.
const uint16_t kApaMatrixWidth
Width of the APA matrix or strip.
#define COLOR_DEPTH
Specifies the color depth used for storing pixels in the layers.
const uint32_t kApaMatrixOptions
Options for APA matrices, including color order.
const uint8_t kApaDmaBufferRows
Not currently used for APA matrices.
const uint8_t kApaPanelType
Not currently used for APA matrices.
const uint16_t kApaMatrixHeight
Height of the APA matrix. Set to 1 for strips.
const uint8_t kApaRefreshDepth
Not currently used for APA matrices.
const uint8_t kDmaBufferRows
Number of DMA buffer rows for HUB75 matrices.
const uint8_t kPanelType
Specifies the panel type for HUB75 matrices.
const uint8_t kBackgroundLayerOptions
Background layer options for HUB75 matrices.
const uint8_t kRefreshDepth
Specifies the tradeoff between color quality and refresh rate for HUB75 matrices.
const uint16_t kMatrixWidth
Width of the HUB75 matrix.
const uint32_t kMatrixOptions
Options for HUB75 matrices.
const uint16_t kMatrixHeight
Height of the HUB75 matrix.
virtual IPixelGroup * GetPixelGroup()=0
Retrieves the associated pixel group.
Manages multiple CameraBase objects.
CameraBase ** GetCameras()
Retrieves the array of CameraBase objects.
Base class for managing brightness and display operations of lighting controllers.
uint8_t maxAccentBrightness
Maximum allowed accent brightness level.
uint8_t accentBrightness
Current accent brightness level.
uint8_t brightness
Current brightness level.
uint8_t maxBrightness
Maximum allowed brightness level.
CameraManager * cameras
Pointer to the CameraManager for managing camera data.
void UpdateBrightness()
Updates the brightness based on internal logic.
bool isOn
Indicates if the controller is active.
void Initialize() override
Initializes the HUB75ControllerSquare and sets up the square display.
void Display() override
Updates and displays the content on the square display.
void SetAccentBrightness(uint8_t maxAccentBrightness) override
Sets the maximum brightness for any secondary accent lighting.
HUB75ControllerSquare(CameraManager *cameras, uint8_t maxBrightness, uint8_t maxAccentBrightness)
Constructs a HUB75ControllerSquare with specified parameters.
void SetBrightness(uint8_t maxBrightness) override
Sets the maximum brightness of the square display.
Interface for managing and interacting with a collection of pixels.
virtual RGBColor * GetColor(uint16_t count)=0
Retrieves the color of a specific pixel.
uint8_t B
Blue component of the color (0-255).
uint8_t G
Green component of the color (0-255).
uint8_t R
Red component of the color (0-255).