Skip to content

Commit

Permalink
fix(led_strip): Extend reset to support WS2812B-V5
Browse files Browse the repository at this point in the history
WS2812B-V5 requires >280 microsecond reset time.

When led_strip drives them with 50 microsecond reset time,
about 1/3 of certain transmission patterns would cause an
LED to fail to reset, leading to duplicated colors further
down the led strip.
  • Loading branch information
bryghtlabs-richard authored and igrr committed Jan 22, 2024
1 parent 4e5c5ad commit f1134b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion led_strip/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2.5.2"
version: "2.5.3"
description: Driver for Addressable LED Strip (WS2812, etc)
url: https://github.com/espressif/idf-extra-components/tree/master/led_strip
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion led_strip/src/led_strip_rmt_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ esp_err_t rmt_new_led_strip_encoder(const led_strip_encoder_config_t *config, rm
rmt_copy_encoder_config_t copy_encoder_config = {};
ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(&copy_encoder_config, &led_encoder->copy_encoder), err, TAG, "create copy encoder failed");

uint32_t reset_ticks = config->resolution / 1000000 * 50 / 2; // reset code duration defaults to 50us
uint32_t reset_ticks = config->resolution / 1000000 * 280 / 2; // reset code duration defaults to 280us to accomodate WS2812B-V5
led_encoder->reset_code = (rmt_symbol_word_t) {
.level0 = 0,
.duration0 = reset_ticks,
Expand Down

0 comments on commit f1134b0

Please sign in to comment.