15 :
src_(static_cast<light::AddressableLight *>(src->get_output())),
40 seg.set_dst_offset(off);
41 off += seg.get_size();
44 int32_t
size()
const override {
46 return last_seg.get_dst_offset() + last_seg.get_size();
50 seg.get_src()->clear_effect_data();
56 seg.get_src()->schedule_show();
66 uint32_t mid = (lo + hi) / 2;
71 }
else if (index >=
end) {
79 int32_t seg_off = index - seg.get_dst_offset();
82 if (seg.is_reversed()) {
83 src_off = seg.get_src_offset() + seg.get_size() - seg_off - 1;
85 src_off = seg.get_src_offset() + seg_off;
88 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_
Providing packet encoding functions for exchanging data with a remote host.