Skip to content

Commit

Permalink
e131: fix issue 1579: limitation of maximum light count (esphome#1619)
Browse files Browse the repository at this point in the history
  • Loading branch information
docteurzoidberg authored Mar 19, 2021
1 parent a77784a commit e5b45b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esphome/components/e131/e131_addressable_light_effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ bool E131AddressableLightEffect::process_(int universe, const E131Packet &packet

int output_offset = (universe - first_universe_) * get_lights_per_universe();
// limit amount of lights per universe and received
int output_end = std::min(it->size(), std::min(output_offset + get_lights_per_universe(), packet.count - 1));
int output_end =
std::min(it->size(), std::min(output_offset + get_lights_per_universe(), output_offset + packet.count - 1));
auto input_data = packet.values + 1;

ESP_LOGV(TAG, "Applying data for '%s' on %d universe, for %d-%d.", get_name().c_str(), universe, output_offset,
Expand Down

0 comments on commit e5b45b6

Please sign in to comment.