File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ void closeFile() {
5050 if (!f) {doCloseFile = false ; return ;} // WLEDMM only do all this hick-hack when f is an open file
5151
5252 bool oldLock = suspendStripService;
53- #if ! defined(WLEDMM_NO_FILEWAIT ) // not necessary if we have the flicker-free RMTHI driver
53+ #if defined(WLEDMM_FILEWAIT ) // only wait if we don't have the flicker-free RMTHI driver
5454 unsigned long t_wait = millis ();
5555 if (strip.isUpdating ()) suspendStripService = true ; // WLEDMM schedule short pause to prevent LEDs glitching during flash write
5656 while (strip.isUpdating () && (millis () - t_wait < 72 )) delay (1 ); // WLEDMM try to catch a moment when strip is idle
@@ -550,7 +550,7 @@ bool handleFileRead(AsyncWebServerRequest* request, String path){
550550 #endif
551551
552552 // wait for strip to finish updating, accessing FS during sendout causes glitches
553- #if defined(ARDUINO_ARCH_ESP32) && ! defined(WLEDMM_NO_FILEWAIT) // not necessary if we have the flicker-free RMTHI driver
553+ #if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FILEWAIT) // only wait if we don't have the flicker-free RMTHI driver
554554 unsigned wait_start = millis ();
555555 while (strip.isUpdating () && (millis () - wait_start < 40 )) delay (1 ); // wait max 40ms
556556 #endif
Original file line number Diff line number Diff line change 182182
183183
184184// WLEDMM: Do we have the flicker-free RMTHI driver?
185- #if defined(ARDUINO_ARCH_ESP32)
186- #if !defined(WLED_USE_SHARED_RMT) && !defined(__riscv) && (ESP_IDF_VERSION_MAJOR >= 4)
187- #define WLEDMM_NO_FILEWAIT 1
185+ #if ! defined(ARDUINO_ARCH_ESP32) || (defined(WLED_USE_SHARED_RMT) || defined(__riscv) || (ESP_IDF_VERSION_MAJOR < 4) )
186+ #ifndef WLEDMM_FILEWAIT
187+ #define WLEDMM_FILEWAIT 1 // wait for LEDs output completion before file reading/writing
188188#endif
189189#endif
190190
You can’t perform that action at this time.
0 commit comments