Update e131_addressable_light_effect.cpp

This commit is contained in:
Jesse Hills 2024-06-06 18:31:35 +12:00 committed by GitHub
parent 03b2d3f9d3
commit 460ce5991c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ bool E131AddressableLightEffect::process_(int universe, const E131Packet &packet
// limit amount of lights per universe and received // limit amount of lights per universe and received
int output_end = int output_end =
std::min(it->size(), std::min(output_offset + get_lights_per_universe(), output_offset + packet.count - 1)); std::min(it->size(), std::min(output_offset + get_lights_per_universe(), output_offset + packet.count - 1));
auto *input_data = packet.values + 1; auto *input_data = packet.values + 1 + (this->channel_offset_ * this->channels_);
ESP_LOGV(TAG, "Applying data for '%s' on %d universe, for %" PRId32 "-%d.", get_name().c_str(), universe, ESP_LOGV(TAG, "Applying data for '%s' on %d universe, for %" PRId32 "-%d.", get_name().c_str(), universe,
output_offset, output_end); output_offset, output_end);