Skip to content

Commit

Permalink
led_strip: fix stability for WS2812B
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleRus committed Apr 30, 2021
1 parent 933114d commit 65a2433
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- (led_strip) White component for RGBW strips now calculated automatically
- (led_strip) Fixed bug in led_strip_set_pixels()
- (led_strip) Added support for global brightness for ESP-IDF >= v4.4
- (led_strip) Improved stability for WS2812B
- (refactoring) Updated component makefiles and CMakeLists
- (i2cdev) Added option to disable all mutexes

Expand Down
6 changes: 3 additions & 3 deletions components/led_strip/led_strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ static const char *TAG = "led_strip";

#define LED_STRIP_RMT_CLK_DIV 2

#define WS2812_T0H_NS 350
#define WS2812_T0H_NS 400
#define WS2812_T0L_NS 1000
#define WS2812_T1H_NS 1000
#define WS2812_T1L_NS 350
#define WS2812_T1L_NS 400

#define SK6812_T0H_NS 300
#define SK6812_T0L_NS 900
Expand Down Expand Up @@ -113,7 +113,7 @@ static void IRAM_ATTR _rmt_adapter(const void *src, rmt_item32_t *dest, size_t s
while (size < src_size && num < wanted_num)
{
#ifdef LED_STIRP_BRIGNTNESS
uint8_t b = scale8_video(*psrc, brightness);
uint8_t b = brightness != 255 ? scale8_video(*psrc, brightness) : *psrc;
#else
uint8_t b = *psrc;
#endif
Expand Down

0 comments on commit 65a2433

Please sign in to comment.