14 :
src_(static_cast<light::AddressableLight *>(
src->get_output())),
40 seg.set_dst_offset(off);
41 off += seg.get_size();
45 int32_t
size()
const override {
47 return last_seg.get_dst_offset() + last_seg.get_size();
51 seg.get_src()->clear_effect_data();
57 seg.get_src()->schedule_show();
71 uint8_t
get_channel(int32_t index, uint8_t channel)
const override {
84 void set(int32_t index,
Color color)
override {
94 void set_channel_raw(int32_t index, uint8_t channel, uint8_t raw_value)
override {
101#ifdef USE_LIGHT_POWER_ESTIMATION
116#ifdef USE_LIGHT_POWER_ESTIMATION
123 .set_power_brightness(color_view_correction ? color_view_correction->
get_power_brightness() : 255);
ESPColorAccessor * accessor_
ESPColorCorrection correction_
Abstract interface for accessing color and effect data for an addressable light by index.
uint8_t color_correct_channel(uint8_t channel, uint8_t value) const ESPHOME_ALWAYS_INLINE
Color color_correct(Color color) const ESPHOME_ALWAYS_INLINE
uint8_t color_uncorrect_channel(uint8_t channel, uint8_t raw_value) const
uint8_t get_power_brightness() const
Color color_uncorrect(Color raw_color) const
Gets or sets the color or effect data at a specific index within an color accessor.
void set_effect_data(uint8_t value) override
uint8_t get_effect_data() const
const ESPColorCorrection * get_color_correction_internal() const
void set_channel_raw(uint8_t channel, uint8_t raw_value)
uint8_t get_channel_raw(uint8_t channel) const
void set_raw(Color raw_color)
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
This class is used to represent the capabilities of a light.
AddressableSegment(light::LightState *src, int32_t src_offset, int32_t size, bool reversed)
int32_t get_dst_offset() const
void set_dst_offset(int32_t dst_offset)
light::AddressableLight * src_
light::AddressableLight * get_src() const
int32_t get_src_offset() const
void set_effect_data(int32_t index, uint8_t value) override
uint8_t get_channel(int32_t index, uint8_t channel) const override
const light::ESPColorCorrection * get_color_correction_internal(int32_t index) const override
uint8_t get_effect_data(int32_t index) const override
Color get(int32_t index) const override
void set_raw(int32_t index, Color raw_color) override
uint8_t get_channel_raw(int32_t index, uint8_t channel) const override
const PartitionLightOutput *const parent_
void set(int32_t index, Color color) override
void set_channel(int32_t index, uint8_t channel, uint8_t value) override
Color get_raw(int32_t index) const override
PartitionColorAccessor(const PartitionLightOutput *parent)
void set_channel_raw(int32_t index, uint8_t channel, uint8_t raw_value) override
const light::ESPColorCorrection * get_color_correction_(const light::ESPColorView &color_view) const
void write_state(light::LightState *state) override
light::LightTraits get_traits() override
int32_t size() const override
PartitionColorAccessor internal_accessor_
light::ESPColorView get_color_view_(int32_t index) const
void clear_effect_data() override
PartitionLightOutput(std::vector< AddressableSegment > segments)
std::vector< AddressableSegment > segments_