14 :
src_(static_cast<light::AddressableLight *>(src->get_output())),
39 seg.set_dst_offset(off);
40 off += seg.get_size();
43 int32_t
size()
const override {
45 return last_seg.get_dst_offset() + last_seg.get_size();
49 seg.get_src()->clear_effect_data();
55 seg.get_src()->schedule_show();
70 }
else if (index >=
end) {
78 int32_t seg_off = index - seg.get_dst_offset();
81 if (seg.is_reversed()) {
82 src_off = seg.get_src_offset() + seg.get_size() - seg_off - 1;
84 src_off = seg.get_src_offset() + seg_off;
87 auto view = (*seg.get_src())[src_off];
ESPColorCorrection correction_
void raw_set_color_correction(const ESPColorCorrection *color_correction)
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 write_state(light::LightState *state) override
light::LightTraits get_traits() override
int32_t size() const override
void clear_effect_data() override
light::ESPColorView get_view_internal(int32_t index) const override
PartitionLightOutput(std::vector< AddressableSegment > segments)
std::vector< AddressableSegment > segments_