From 641e2ca955a7f42b94e46b2f5e225c038bac3b62 Mon Sep 17 00:00:00 2001 From: Gregg Date: Sun, 3 Oct 2021 22:01:37 -0500 Subject: [PATCH] Added check in RFControl to allow for backwards compatibility with Arduino-ESP 1.0.6 To do: Disable watchdog timer in ESP32-C3 --- src/extras/RFControl.cpp | 2 ++ src/extras/extras.ino | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/extras/RFControl.cpp b/src/extras/RFControl.cpp index c71c4ce..ed89819 100644 --- a/src/extras/RFControl.cpp +++ b/src/extras/RFControl.cpp @@ -22,7 +22,9 @@ RFControl::RFControl(uint8_t pin){ config->rmt_mode=RMT_MODE_TX; config->tx_config.carrier_en=false; config->channel=(rmt_channel_t)nChannels; +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) config->flags=0; +#endif config->clk_div = 1; config->mem_block_num=1; config->gpio_num=(gpio_num_t)pin; diff --git a/src/extras/extras.ino b/src/extras/extras.ino index 86e56d3..c709135 100644 --- a/src/extras/extras.ino +++ b/src/extras/extras.ino @@ -10,11 +10,8 @@ void setup() { Serial.println("\n\nHomeSpan RF Transmitter Example"); - RFControl rf(19); // create an instance of RFControl with signal output to pin 6 + RFControl rf(18); // create an instance of RFControl with signal output to pin 6 - for(int i=0;i<8;i++) - new RFControl(18); - #define NPOINTS 3 uint32_t data[NPOINTS];