fix: run FTP server in dedicated FreeRTOS task to unblock LVGL
Move ftpSrv.handleFTP() from Arduino loop() into a dedicated FreeRTOS task pinned to core 0, leaving core 1 free for LVGL display updates. FTP callbacks now only set volatile flags (ftp_ui_dirty, ftp_sd_dirty) which the main loop polls to safely update UI and NeoPixel from core 1. This eliminates the 20-second PASV data connection timeouts caused by handleFTP() competing with display.update() for CPU time. Also fix pre-existing BLACK constant build error in display_manager.cpp.
This commit is contained in:
@@ -51,7 +51,7 @@ bool DisplayManager::init() {
|
||||
if (pct > 100) pct = 100;
|
||||
gfx->setBrightness((uint8_t)(((uint16_t)pct * 255 + 50) / 100));
|
||||
}
|
||||
gfx->fillScreen(BLACK);
|
||||
gfx->fillScreen((uint16_t)0x0000);
|
||||
Serial.println("[DISP] Panel OK");
|
||||
|
||||
/* ── LVGL 9 init ───────────────────────────────────────────── */
|
||||
|
||||
Reference in New Issue
Block a user