|
@@ -320,9 +320,8 @@ void GpioHandler::deinit() {
|
|
|
}
|
|
}
|
|
|
#ifdef __LEDGLOBAL
|
|
#ifdef __LEDGLOBAL
|
|
|
if (leds_global != NULL) {
|
|
if (leds_global != NULL) {
|
|
|
- if (!leds_global->wait(pdMS_TO_TICKS(1000))) {
|
|
|
|
|
- ESP_LOGW(TAG, "Timed out waiting for LED transmission before deinit");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // Wait until RMT has finished using the LED buffers before destroying the driver.
|
|
|
|
|
+ leds_global->wait();
|
|
|
delete leds_global;
|
|
delete leds_global;
|
|
|
leds_global = NULL;
|
|
leds_global = NULL;
|
|
|
}
|
|
}
|