mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
example: fix led strip memory overwrite before trans done
Closes https://github.com/espressif/esp-idf/issues/11487
This commit is contained in:
parent
ff024dcb88
commit
ab6ae9341a
@ -118,9 +118,11 @@ void app_main(void)
|
||||
}
|
||||
// Flush RGB values to LEDs
|
||||
ESP_ERROR_CHECK(rmt_transmit(led_chan, led_encoder, led_strip_pixels, sizeof(led_strip_pixels), &tx_config));
|
||||
ESP_ERROR_CHECK(rmt_tx_wait_all_done(led_chan, portMAX_DELAY));
|
||||
vTaskDelay(pdMS_TO_TICKS(EXAMPLE_CHASE_SPEED_MS));
|
||||
memset(led_strip_pixels, 0, sizeof(led_strip_pixels));
|
||||
ESP_ERROR_CHECK(rmt_transmit(led_chan, led_encoder, led_strip_pixels, sizeof(led_strip_pixels), &tx_config));
|
||||
ESP_ERROR_CHECK(rmt_tx_wait_all_done(led_chan, portMAX_DELAY));
|
||||
vTaskDelay(pdMS_TO_TICKS(EXAMPLE_CHASE_SPEED_MS));
|
||||
}
|
||||
start_rgb += 60;
|
||||
|
Loading…
Reference in New Issue
Block a user