Skip to content

Commit

Permalink
Fix the conflict between the IR remote RMT channel and the LED VU RMT…
Browse files Browse the repository at this point in the history
… channel.
  • Loading branch information
rochuck committed Oct 22, 2020
1 parent 9a6836a commit 8f72bbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/led_strip/led_strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ bool led_strip_init(struct led_strip_t *led_strip)
TaskHandle_t led_strip_task_handle;

if ((led_strip == NULL) ||
(led_strip->rmt_channel == RMT_CHANNEL_MAX) ||
(led_strip->gpio > GPIO_NUM_33) || // only inputs above 33
(led_strip->rmt_channel >= RMT_CHANNEL_MAX) ||
(led_strip->gpio > GPIO_NUM_33) ||
(led_strip->led_strip_working == NULL) ||
(led_strip->led_strip_showing == NULL) ||
(led_strip->led_strip_length == 0) ||
Expand Down
4 changes: 2 additions & 2 deletions components/squeezelite/rgb_led_vu.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void display_led_progress(int pct);
static struct led_strip_t* led_strip_p = NULL;
static struct led_strip_t led_strip_config = {
.rgb_led_type = RGB_LED_TYPE_WS2812,
.rmt_channel = RMT_CHANNEL_0,
.rmt_channel = RMT_CHANNEL_1,
.rmt_interrupt_num = LED_STRIP_RMT_INTR_NUM,
.gpio = GPIO_NUM_21,
};
Expand Down Expand Up @@ -144,7 +144,7 @@ rgb_led_vu_init(bool recovery)

/* grab all the memory just in case. Not doing this was causing
glitching on larger length strings */
rmt_set_mem_block_num(RMT_CHANNEL_0, 8);
rmt_set_mem_block_num(RMT_CHANNEL_1, 7);

/* Display RGB on first three values */
led_strip_clear(led_strip_p);
Expand Down

0 comments on commit 8f72bbc

Please sign in to comment.