Skip to content

Commit 7c16c40

Browse files
committed
T-Embed LED (no cc1101) fix
BruceDevices#1132
1 parent 6384dae commit 7c16c40

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

src/core/led_control.cpp

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,31 @@ void beginLed() {
100100
* by the RF functions, in this case, we are restarting it all the time
101101
*/
102102
// -- RMT configuration for transmission
103-
rmt_config_t rmt_tx;
104-
memset(&rmt_tx, 0, sizeof(rmt_config_t));
105-
rmt_tx.channel = rmt_channel_t(FASTLED_ESP32_RMT_CHANNEL_0);
106-
rmt_tx.rmt_mode = RMT_MODE_TX;
107-
rmt_tx.gpio_num = (gpio_num_t)RGB_LED;
108-
rmt_tx.mem_block_num = 2;
109-
rmt_tx.clk_div = 2;
110-
rmt_tx.tx_config.loop_en = false;
111-
rmt_tx.tx_config.carrier_level = RMT_CARRIER_LEVEL_LOW;
112-
rmt_tx.tx_config.carrier_en = false;
113-
rmt_tx.tx_config.idle_level = RMT_IDLE_LEVEL_LOW;
114-
rmt_tx.tx_config.idle_output_en = true;
115-
116-
// -- Apply the configuration
117-
rmt_config(&rmt_tx);
118-
rmt_driver_uninstall(rmt_channel_t(FASTLED_ESP32_RMT_CHANNEL_0));
119-
rmt_driver_install(rmt_channel_t(FASTLED_ESP32_RMT_CHANNEL_0), 0, 0);
120103

104+
// These configurations made T-Embed (non CC1101) stop working
105+
// Commented to test if with the FASTLED_RMT_MAX_CHANNELS 1 was sufficient for the other devices to work
106+
// LED and RF Spectrum and RAW capture and it is working well without it for now.. So I'll keep the code
107+
// below for the case we find some issue and need to rollback
108+
109+
/*
110+
rmt_config_t rmt_tx;
111+
memset(&rmt_tx, 0, sizeof(rmt_config_t));
112+
rmt_tx.channel = rmt_channel_t(FASTLED_ESP32_RMT_CHANNEL_0);
113+
rmt_tx.rmt_mode = RMT_MODE_TX;
114+
rmt_tx.gpio_num = (gpio_num_t)RGB_LED;
115+
rmt_tx.mem_block_num = 2;
116+
rmt_tx.clk_div = 2;
117+
rmt_tx.tx_config.loop_en = false;
118+
rmt_tx.tx_config.carrier_level = RMT_CARRIER_LEVEL_LOW;
119+
rmt_tx.tx_config.carrier_en = false;
120+
rmt_tx.tx_config.idle_level = RMT_IDLE_LEVEL_LOW;
121+
rmt_tx.tx_config.idle_output_en = true;
122+
123+
// -- Apply the configuration
124+
rmt_config(&rmt_tx);
125+
rmt_driver_uninstall(rmt_channel_t(FASTLED_ESP32_RMT_CHANNEL_0));
126+
rmt_driver_install(rmt_channel_t(FASTLED_ESP32_RMT_CHANNEL_0), 0, 0);
127+
*/
121128
if (bruceConfig.ledColor == LED_COLOR_WHEEL && colorWheelTaskHandle == NULL) {
122129
xTaskCreate(colorWheelTask, "ColorWheel", 2048, NULL, 1, &colorWheelTaskHandle);
123130
} else setLedColor(bruceConfig.ledColor);

0 commit comments

Comments
 (0)