From f6c90adb42bb12d403bc027e247c791d16e04941 Mon Sep 17 00:00:00 2001 From: DeeFuse <7376678+Dee-Fuse@users.noreply.github.com> Date: Tue, 11 Feb 2020 19:59:56 +0100 Subject: [PATCH] Update ir_protocols_main.c RMT write should be non-blocking to wait the correct time for sending the repeat frame --- .../peripherals/rmt/ir_protocols/main/ir_protocols_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c b/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c index a2da0b144..b9fa721b4 100644 --- a/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c +++ b/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c @@ -99,12 +99,12 @@ static void example_ir_tx_task(void *arg) ESP_ERROR_CHECK(ir_builder->build_frame(ir_builder, addr, cmd)); ESP_ERROR_CHECK(ir_builder->get_result(ir_builder, &items, &length)); //To send data according to the waveform items. - rmt_write_items(example_tx_channel, items, length, true); + rmt_write_items(example_tx_channel, items, length, false); // Send repeat code vTaskDelay(pdMS_TO_TICKS(ir_builder->repeat_period_ms)); ESP_ERROR_CHECK(ir_builder->build_repeat_frame(ir_builder)); ESP_ERROR_CHECK(ir_builder->get_result(ir_builder, &items, &length)); - rmt_write_items(example_tx_channel, items, length, true); + rmt_write_items(example_tx_channel, items, length, false); cmd++; } ir_builder->del(ir_builder);