protected inheritence to avoid uncontroled hardware calls
More...
#include <strip.h>
|
|
| LedStrip (int16_t pin, neoPixelType type=NEO_RGB+NEO_KHZ800) |
| |
|
| LedStrip (const LedStrip &)=delete |
| |
|
LedStrip & | operator= (LedStrip const &)=delete |
| |
|
void | show () |
| |
|
void | setBrightness (uint8_t b) |
| | Brightness is an internal counter.
|
| |
|
uint8_t | getBrightness () const |
| | Brightness is an internal flag.
|
| |
|
void | setBlackout (const bool shouldBlackout) |
| | While set, the next shows write black to all leds, whatever the brightness or masks. The colors are kept.
|
| |
| void | begin () |
| |
| uint32_t | getRawPixelColor (uint16_t n) const |
| | Return the raw color value stored in the send buffer.
|
| |
|
void | show_now () |
| | Show the current data, independant of changes.
|
| |
|
void | setPixelColor (uint16_t n, uint32_t c) |
| |
|
uint32_t | getPixelColor (uint16_t n) const |
| |
|
void | signal_display () |
| |
|
void | mask_led_at_index (const size_t n, const bool shouldMask) |
| | Set a pixel to be masked at the next show.
|
| |
|
| static uint8_t | restore_color_with_brightness (uint8_t colorIn, const uint8_t brightness) |
| | Convert a color to the standard range, assuming it starts as brightness level.
|
| |
| static std::pair< uint8_t, uint8_t > | get_brightness_color_and_error (const uint8_t colorIn, uint16_t errorIn, const uint8_t brightness, const uint16_t index) |
| | Convert a color to the desired brightness level, with an error adjustment.
|
| |
| static uint32_t | convert_color_with_brightness (const uint32_t color, const uint8_t brightness, const uint16_t index, uint32_t &error) |
| | Convert a color to the correct brightness, with temporal dithering.
|
| |
|
|
std::array< BufferTy, stripNbBuffers > | _buffers |
| | buffers for computations
|
| |
|
|
struct | modes::hardware::LampTy |
| |
protected inheritence to avoid uncontroled hardware calls
◆ begin()
| void lampda::component::LedStrip::begin |
( |
void |
| ) |
|
|
inline |
EXPLICIT CALLS TO THE LIBRARY
◆ convert_color_with_brightness()
| static uint32_t lampda::component::LedStrip::convert_color_with_brightness |
( |
const uint32_t |
color, |
|
|
const uint8_t |
brightness, |
|
|
const uint16_t |
index, |
|
|
uint32_t & |
error |
|
) |
| |
|
inlinestatic |
Convert a color to the correct brightness, with temporal dithering.
- Warning
- The given brightness should be 0-255
- Parameters
-
| [in] | c | Color to convert, in the full scale 0-255, unadjusted to brightness |
| [in] | brightness | The brightness to apply (0 - 255). |
| [in] | index | Index of the noise to use |
| [in,out] | error | Error components of the current colors |
◆ get_brightness_color_and_error()
| static std::pair< uint8_t, uint8_t > lampda::component::LedStrip::get_brightness_color_and_error |
( |
const uint8_t |
colorIn, |
|
|
uint16_t |
errorIn, |
|
|
const uint8_t |
brightness, |
|
|
const uint16_t |
index |
|
) |
| |
|
inlinestatic |
Convert a color to the desired brightness level, with an error adjustment.
- Parameters
-
| [in] | colorIn | Raw color data to convert |
| [in] | errorIn | Additive color error from last run |
| [in] | brightness | Desired brightness level (0 - 255) |
| [in] | index | Index of the noise to use |
- Returns
- Pair of converted color and new error component
◆ getRawPixelColor()
| uint32_t lampda::component::LedStrip::getRawPixelColor |
( |
uint16_t |
n | ) |
const |
|
inline |
Return the raw color value stored in the send buffer.
- Warning
- Should not be used except for debug
◆ restore_color_with_brightness()
| static uint8_t lampda::component::LedStrip::restore_color_with_brightness |
( |
uint8_t |
colorIn, |
|
|
const uint8_t |
brightness |
|
) |
| |
|
inlinestatic |
Convert a color to the standard range, assuming it starts as brightness level.
END OF EXPLICIT CALLS
- Warning
- This breaks the color resolution, on purpose !
- Parameters
-
| [in] | colorIn | Raw color data to convert |
| [in] | brightness | Desired brightness level (0 - 255) |
- Returns
- converted color
The documentation for this class was generated from the following file: