#include <LEDController.h>
|
virtual void | triggerLEDUpdate ()=0 |
|
virtual uint8_t | getLEDStripMask (uint8_t channel, uint8_t group) |
|
virtual void | setLEDExternalTemperature (uint8_t channel, uint16_t temp)=0 |
|
virtual bool | setLEDGroup (uint8_t channel, uint8_t groupIndex, LEDGroup &group) |
|
virtual void | setLEDColorValues (uint8_t channel, uint8_t color, uint8_t offset, const uint8_t *values, size_t len)=0 |
|
virtual bool | setLEDMode (uint8_t channel, ChannelMode mode) |
|
virtual bool | setLEDBrightness (uint8_t channel, uint8_t brightness) |
|
virtual bool | setLEDPortType (uint8_t channel, PortType ledPortType) |
|
virtual void | clearLEDColorValues (uint8_t channel)=0 |
|
virtual bool | clearLEDGroups (uint8_t channel) |
|
virtual void | startLEDAutodetection (uint8_t channel) |
|
virtual uint8_t | getLEDAutodetectionResult (uint8_t channel)=0 |
|
virtual bool | save ()=0 |
|
virtual bool | load ()=0 |
|
bool | saveIfNeeded () |
|
The abstract implemenation of an LEDController. This implementation handles the parsing and interpretation of incoming commands. It also defines the data model to store the all required data from the commands.
◆ clearLEDColorValues()
virtual void LEDController::clearLEDColorValues |
( |
uint8_t |
channel | ) |
|
|
protectedpure virtual |
◆ getChannel()
const LEDChannel & LEDController::getChannel |
( |
uint8_t |
channelIndex | ) |
|
Get the data of a Channel from this LEDController.
- Parameters
-
channelIndex | the index of the channel |
- Returns
- a reference to the LEDChannel
◆ getLEDAutodetectionResult()
virtual uint8_t LEDController::getLEDAutodetectionResult |
( |
uint8_t |
channel | ) |
|
|
protectedpure virtual |
Get the result of the LED number autodetection on the given channel. Potential values for LT100: 27, 54, 81, 108
- Parameters
-
- Returns
- the number of LEDs currently connected to the channel
- See also
- startLEDAutodetection()
Implemented in FastLEDController.
◆ getLEDStripMask()
uint8_t LEDController::getLEDStripMask |
( |
uint8_t |
channel, |
|
|
uint8_t |
group |
|
) |
| |
|
protectedvirtual |
Get the LED count of the group.
- Parameters
-
channel | the channel index |
group | the group index |
- Returns
- the number of LEDs in the group
◆ handleLEDControl()
Handle LED commands and send a response. This method is called for each received command.
- Parameters
-
command | the command which must be handled |
response | the callback for the response |
Implements ILEDController.
◆ isValidLEDChannel()
bool LEDController::isValidLEDChannel |
( |
const LEDChannel & |
ledChannel | ) |
|
|
virtual |
Validates a LEDChannel by checking all constrains on the values. This function should be used after non type-safe operations on a LEDChannel.
- Parameters
-
- Returns
- true if the LEDChannel is valid, false otherwise
◆ isValidLEDGroup()
bool LEDController::isValidLEDGroup |
( |
const LEDGroup & |
ledGroup | ) |
|
|
virtual |
Validates a LEDGroup by checking all constrains on the values. This function should be used after non type-safe operations on a LEDGroup.
- Parameters
-
- Returns
- true if the LEDGroup is valid, false otherwise
◆ reset()
void LEDController::reset |
( |
| ) |
|
|
virtual |
Reset all persistent data to default values of the LEDController.
◆ saveIfNeeded()
bool LEDController::saveIfNeeded |
( |
| ) |
|
|
protected |
Save if triggerSave is true and then reset triggerSave.
◆ setLEDBrightness()
bool LEDController::setLEDBrightness |
( |
uint8_t |
channel, |
|
|
uint8_t |
brightness |
|
) |
| |
|
protectedvirtual |
The brightness of the channel. This only applies to HW lighting.
- Parameters
-
channel | the channel index |
brightness | the brightness in the range 0-255 |
- Returns
- true if the brightness was changed
◆ setLEDColorValues()
virtual void LEDController::setLEDColorValues |
( |
uint8_t |
channel, |
|
|
uint8_t |
color, |
|
|
uint8_t |
offset, |
|
|
const uint8_t * |
values, |
|
|
size_t |
len |
|
) |
| |
|
protectedpure virtual |
Set the LED color values for one color-channel (red, green or blue) of the given channel.
- Parameters
-
channel | the channel index |
color | the color index to set the values for red(0), green(1), blue(2) |
offset | the offset in the LED colors buffer to write to |
values | the array of values to write |
len | the length of the array of values to write |
- See also
- clearLEDColorValues()
Implemented in FastLEDController.
◆ setLEDExternalTemperature()
virtual void LEDController::setLEDExternalTemperature |
( |
uint8_t |
channel, |
|
|
uint16_t |
temp |
|
) |
| |
|
protectedpure virtual |
Set the external temperature for a channel.
- Parameters
-
channel | the channel index |
temp | the temperature in hundredths of a degree Celsius. |
Implemented in FastLEDController.
◆ setLEDMode()
bool LEDController::setLEDMode |
( |
uint8_t |
channel, |
|
|
ChannelMode |
mode |
|
) |
| |
|
protectedvirtual |
Set the Channel mode.
- Parameters
-
channel | the channel index |
mode | the new mode |
- Returns
- true if the mode was changed, false otherwise
◆ setLEDPortType()
bool LEDController::setLEDPortType |
( |
uint8_t |
channel, |
|
|
PortType |
ledPortType |
|
) |
| |
|
protectedvirtual |
Set the type of LED chipset: WS2812B or UCS1903
- Parameters
-
channel | the channel index |
ledPortType | the port type |
- Returns
- true if the port type was changed
◆ startLEDAutodetection()
void LEDController::startLEDAutodetection |
( |
uint8_t |
channel | ) |
|
|
protectedvirtual |
Start the potentially long running process to detect the current number of LEDs connected to given channel.
- Parameters
-
- See also
- getLEDAutodetectionResult()
◆ triggerLEDUpdate()
virtual void LEDController::triggerLEDUpdate |
( |
| ) |
|
|
protectedpure virtual |
◆ lastCommand
unsigned long LEDController::lastCommand = 0 |
|
protected |
Stores the time at which the last command was received by the LEDController.
◆ triggerSave
bool LEDController::triggerSave = false |
|
protected |
Indicates that the configuration of the channels has been changed and should be saved.
The documentation for this class was generated from the following files: