Had broken the build for v4.0. Fixed now howpefully still testing

This commit is contained in:
Brian Bulkowski
2020-06-29 11:17:33 -07:00
parent 6f4910bf81
commit 6fb2ce6fa1

View File

@ -279,8 +279,17 @@ protected:
for (int i = 0; i < FASTLED_RMT_MAX_CHANNELS; i++) { for (int i = 0; i < FASTLED_RMT_MAX_CHANNELS; i++) {
gOnChannel[i] = NULL; gOnChannel[i] = NULL;
// -- RMT configuration for transmission // -- RMT configuration for transmission --- different in different ESP versions
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4,1,0)
rmt_config_t rmt_tx = RMT_DEFAULT_CONFIG_TX(mPin, fastled_get_rmt_channel(i) ); rmt_config_t rmt_tx = RMT_DEFAULT_CONFIG_TX(mPin, fastled_get_rmt_channel(i) );
#else
rmt_config_t rmt_tx;
memset(&rmt_tx, 0, sizeof(rmt_tx));
rmt_tx.channel = fastled_get_rmt_channel(i);
rmt_tx.gpio_num = mPin;
rmt_tx.mem_block_num = 1;
rmt_tx.tx_config.carrier_level = RMT_CARRIER_LEVEL_LOW;
#endif // version before 4.1
rmt_tx.clk_div = DIVIDER; rmt_tx.clk_div = DIVIDER;
// don't wish to have a carrier applied. Therefore carrier_en is false and the extra parameters don't matter. // don't wish to have a carrier applied. Therefore carrier_en is false and the extra parameters don't matter.