9 static const char *
const TAG =
"e131_addressable_light_effect";
29 AddressableLightEffect::start();
41 AddressableLightEffect::stop();
59 auto *input_data = packet.
values + 1;
61 ESP_LOGV(TAG,
"Applying data for '%s' on %d universe, for %" PRId32
"-%d.",
get_name().c_str(), universe,
62 output_offset, output_end);
66 for (; output_offset < output_end; output_offset++, input_data++) {
67 auto output = (*it)[output_offset];
68 output.set(
Color(input_data[0], input_data[0], input_data[0], input_data[0]));
73 for (; output_offset < output_end; output_offset++, input_data += 3) {
74 auto output = (*it)[output_offset];
76 Color(input_data[0], input_data[1], input_data[2], (input_data[0] + input_data[1] + input_data[2]) / 3));
81 for (; output_offset < output_end; output_offset++, input_data += 4) {
82 auto output = (*it)[output_offset];
83 output.set(
Color(input_data[0], input_data[1], input_data[2], input_data[3]));
int get_lights_per_universe() const
bool process_(int universe, const E131Packet &packet)
E131AddressableLightEffect(const std::string &name)
AddressableLight * get_addressable_() const
uint8_t values[E131_MAX_PROPERTY_VALUES_COUNT]
int get_last_universe() const
int get_data_per_universe() const
const std::string & get_name()
int get_first_universe() const
void add_effect(E131AddressableLightEffect *light_effect)
void remove_effect(E131AddressableLightEffect *light_effect)
E131LightChannels channels_
Implementation of SPI Controller mode.
int get_universe_count() const