ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
WS35Controller Class Reference

Manages WS2812-based displays for the Delta, Epsilon, and Sigma Protogen heads. More...

#include <WS35Controller.h>

Inheritance diagram for WS35Controller:
Collaboration diagram for WS35Controller:

Public Member Functions

 WS35Controller (CameraManager *cameras, uint8_t maxBrightness)
 Constructs a WS35Controller with specified parameters.
 
void Initialize () override
 Initializes the WS35Controller 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).
 
- Public Member Functions inherited from 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

- Protected Member Functions inherited from Controller
 Controller (CameraManager *cameras, uint8_t maxBrightness, uint8_t maxAccentBrightness)
 Constructs a Controller with specified parameters.
 
void UpdateBrightness ()
 Updates the brightness based on internal logic.
 
- Protected Attributes inherited from Controller
CameraManagercameras
 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.
 

Detailed Description

Manages WS2812-based displays for the Delta, Epsilon, and Sigma Protogen heads.

The WS35Controller 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 WS35Controller.h.

Constructor & Destructor Documentation

◆ WS35Controller()

WS35Controller ( CameraManager cameras,
uint8_t  maxBrightness 
)

Constructs a WS35Controller with specified parameters.

Parameters
camerasPointer to the CameraManager for managing camera data.
maxBrightnessMaximum brightness for the displays.

Definition at line 5 of file WS35Controller.cpp.

Member Function Documentation

◆ Display()

void Display ( )
overridevirtual

◆ Initialize()

void Initialize ( )
overridevirtual

Initializes the WS35Controller and sets up the displays.

Implements Controller.

Definition at line 8 of file WS35Controller.cpp.

References leds.

◆ SetAccentBrightness()

void SetAccentBrightness ( uint8_t  maxAccentBrightness)
overridevirtual

Sets the maximum accent brightness (not used for this controller).

Parameters
maxAccentBrightnessThe maximum accent brightness value (0-255).

Implements Controller.

Definition at line 56 of file WS35Controller.cpp.

References Controller::accentBrightness, Controller::isOn, and Controller::maxAccentBrightness.

Referenced by AceAnimation::Update(), and ProtogenWS35Project::Update().

◆ SetBrightness()

void SetBrightness ( uint8_t  maxBrightness)
overridevirtual

Sets the maximum brightness for the displays.

Parameters
maxBrightnessThe maximum brightness value (0-255).

Implements Controller.

Definition at line 48 of file WS35Controller.cpp.

References Controller::brightness, Controller::isOn, and Controller::maxBrightness.

Referenced by AceAnimation::Update(), and ProtogenWS35Project::Update().

◆ SetPixels()

void SetPixels ( uint8_t  strip,
uint16_t  led,
RGBColor  rgb 
)

Sets the color of a specific LED on a specific strip.

Parameters
stripThe strip number (0-based).
ledThe LED number (0-based).
rgbThe RGB color to set.

Definition at line 44 of file WS35Controller.cpp.

References RGBColor::B, RGBColor::G, leds, and RGBColor::R.

Member Data Documentation

◆ config

const int config = WS2811_GRB | WS2811_800kHz
private

LED configuration: GRB color order and 800kHz signal.

Definition at line 33 of file WS35Controller.h.

◆ drawingMemory

int drawingMemory[346 *6]
private

Memory buffer for LED data.

Definition at line 32 of file WS35Controller.h.

◆ leds

OctoWS2811 leds
private

Instance of OctoWS2811 for controlling the LEDs.

Definition at line 34 of file WS35Controller.h.

Referenced by Display(), Initialize(), and SetPixels().

◆ ledsPerStrip

const int ledsPerStrip = 346
private

Number of LEDs per strip.

Definition at line 31 of file WS35Controller.h.


The documentation for this class was generated from the following files: