![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Manages WS2812-based displays for the Beta Protogen head. More...
#include <WS35BetaController.h>
Public Member Functions | |
WS35BetaController (CameraManager *cameras, uint8_t maxBrightness) | |
Constructs a WS35BetaController with specified parameters. | |
void | Initialize () override |
Initializes the WS35BetaController and sets up the displays. | |
void | Display () override |
Updates and displays the content on the WS2812 displays. | |
void | SetPixels (uint8_t strip, uint16_t led, RGBColor rgb) |
Sets the color of a specific LED on a specific strip. | |
void | SetBrightness (uint8_t maxBrightness) override |
Sets the maximum brightness for the displays. | |
void | SetAccentBrightness (uint8_t maxAccentBrightness) override |
Sets the maximum accent brightness (not used for this controller). | |
![]() | |
uint8_t | GetBrightness () |
Retrieves the current brightness level. | |
uint8_t | GetAccentBrightness () |
Retrieves the current accent brightness level. | |
Private Attributes | |
const int | ledsPerStrip = 346 |
Number of LEDs per strip. | |
int | drawingMemory [346 *6] |
Memory buffer for LED data. | |
const int | config = WS2811_GRB | WS2811_800kHz |
LED configuration: GRB color order and 800kHz signal. | |
OctoWS2811 | leds |
Instance of OctoWS2811 for controlling the LEDs. | |
Additional Inherited Members | |
![]() | |
Controller (CameraManager *cameras, uint8_t maxBrightness, uint8_t maxAccentBrightness) | |
Constructs a Controller with specified parameters. | |
void | UpdateBrightness () |
Updates the brightness based on internal logic. | |
![]() | |
CameraManager * | cameras |
Pointer to the CameraManager for managing camera data. | |
uint8_t | brightness |
Current brightness level. | |
uint8_t | accentBrightness |
Current accent brightness level. | |
uint8_t | maxBrightness |
Maximum allowed brightness level. | |
uint8_t | maxAccentBrightness |
Maximum allowed accent brightness level. | |
bool | isOn = false |
Indicates if the controller is active. | |
bool | startTime = false |
Indicates if the start time has been recorded. | |
Manages WS2812-based displays for the Beta Protogen head.
The WS35BetaController class extends the Controller base class to provide specific functionality for initializing, controlling, and displaying content on WS2812-based LED displays.
Definition at line 29 of file WS35BetaController.h.
WS35BetaController | ( | CameraManager * | cameras, |
uint8_t | maxBrightness | ||
) |
Constructs a WS35BetaController with specified parameters.
cameras | Pointer to the CameraManager for managing camera data. |
maxBrightness | Maximum brightness for the displays. |
Definition at line 5 of file WS35BetaController.cpp.
|
overridevirtual |
Updates and displays the content on the WS2812 displays.
Implements Controller.
Definition at line 13 of file WS35BetaController.cpp.
References RGBColor::B, Controller::brightness, Controller::cameras, RGBColor::G, CameraManager::GetCameras(), IPixelGroup::GetColor(), CameraBase::GetPixelGroup(), leds, RGBColor::R, RGBColor::Scale(), and Controller::UpdateBrightness().
|
overridevirtual |
Initializes the WS35BetaController and sets up the displays.
Implements Controller.
Definition at line 8 of file WS35BetaController.cpp.
References leds.
Sets the maximum accent brightness (not used for this controller).
maxAccentBrightness | The maximum accent brightness value (0-255). |
Implements Controller.
Definition at line 68 of file WS35BetaController.cpp.
References Controller::accentBrightness, Controller::isOn, and Controller::maxAccentBrightness.
Referenced by BetaProject::Update().
Sets the maximum brightness for the displays.
maxBrightness | The maximum brightness value (0-255). |
Implements Controller.
Definition at line 60 of file WS35BetaController.cpp.
References Controller::brightness, Controller::isOn, and Controller::maxBrightness.
Referenced by BetaProject::Update().
Sets the color of a specific LED on a specific strip.
strip | The strip number (0-based). |
led | The LED number (0-based). |
rgb | The RGB color to set. |
Definition at line 56 of file WS35BetaController.cpp.
References RGBColor::B, RGBColor::G, leds, and RGBColor::R.
|
private |
LED configuration: GRB color order and 800kHz signal.
Definition at line 33 of file WS35BetaController.h.
|
private |
Memory buffer for LED data.
Definition at line 32 of file WS35BetaController.h.
|
private |
Instance of OctoWS2811 for controlling the LEDs.
Definition at line 34 of file WS35BetaController.h.
Referenced by Display(), Initialize(), and SetPixels().
Number of LEDs per strip.
Definition at line 31 of file WS35BetaController.h.