![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Manages APA102 LED strips with camera integration. More...
#include <APA102Controller.h>
Public Member Functions | |
APA102Controller (CameraManager *cameras, uint8_t maxBrightness, uint8_t maxAccentBrightness) | |
Constructs an APA102Controller with specified parameters. | |
void | Initialize () override |
Initializes the APA102Controller and sets up the LED strip. | |
void | Display () override |
Updates and displays the content on the LED strip. | |
void | SetBrightness (uint8_t maxBrightness) override |
Sets the maximum brightness of the LED strip. | |
void | SetAccentBrightness (uint8_t maxAccentBrightness) override |
Sets the maximum accent brightness of the LED strip. | |
![]() | |
uint8_t | GetBrightness () |
Retrieves the current brightness level. | |
uint8_t | GetAccentBrightness () |
Retrieves the current accent brightness level. | |
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 APA102 LED strips with camera integration.
The APA102Controller class extends the Controller base class to provide specific functionality for initializing, controlling, and displaying content on APA102 LED strips.
Definition at line 27 of file APA102Controller.h.
APA102Controller | ( | CameraManager * | cameras, |
uint8_t | maxBrightness, | ||
uint8_t | maxAccentBrightness | ||
) |
Constructs an APA102Controller with specified parameters.
cameras | Pointer to the CameraManager for managing camera data. |
maxBrightness | Maximum brightness for the LED strips. |
maxAccentBrightness | Maximum brightness for accent lighting. |
Definition at line 7 of file APA102Controller.cpp.
|
overridevirtual |
Updates and displays the content on the LED strip.
Implements Controller.
Definition at line 16 of file APA102Controller.cpp.
References RGBColor::B, Controller::brightness, Controller::cameras, RGBColor::G, CameraManager::GetCameras(), IPixelGroup::GetColor(), CameraBase::GetPixelGroup(), kApaMatrixWidth, RGBColor::R, and Controller::UpdateBrightness().
|
overridevirtual |
Initializes the APA102Controller and sets up the LED strip.
Implements Controller.
Definition at line 9 of file APA102Controller.cpp.
Sets the maximum accent brightness of the LED strip.
maxAccentBrightness | The maximum accent brightness value (0-255). |
Implements Controller.
Definition at line 43 of file APA102Controller.cpp.
References Controller::accentBrightness, Controller::isOn, and Controller::maxAccentBrightness.
Referenced by FursuitEyesV1::Update().
Sets the maximum brightness of the LED strip.
maxBrightness | The maximum brightness value (0-255). |
Implements Controller.
Definition at line 35 of file APA102Controller.cpp.
References Controller::brightness, Controller::isOn, and Controller::maxBrightness.
Referenced by FursuitEyesV1::Update().