mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-08-06 18:59:43 +00:00
fix(esp): reduce RAM pressure and TDeck display stalls
Tune Arduino task stacks and board env flags to recover internal RAM for BLE startup. Avoid synchronous boot UI rendering on Arduino loopTask and move large board singletons toward PSRAM where available. Improve TDeck/Pager display responsiveness by restoring practical LVGL DMA buffers, using SPI pixel writes, disabling transition animations, and testing TDeck display SPI at 80MHz.
This commit is contained in:
@@ -26,8 +26,18 @@ namespace
|
||||
|
||||
ui::menu::MenuModel s_ux_menu_model;
|
||||
|
||||
#ifndef TRAIL_MATE_BOOT_UI_SYNC_PRESENT
|
||||
#if defined(ARDUINO)
|
||||
#define TRAIL_MATE_BOOT_UI_SYNC_PRESENT 0
|
||||
#else
|
||||
#define TRAIL_MATE_BOOT_UI_SYNC_PRESENT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if TRAIL_MATE_BOOT_UI_SYNC_PRESENT
|
||||
constexpr uint8_t kBootPresentFrameCount = 4;
|
||||
constexpr uint32_t kBootPresentFrameDelayMs = 16;
|
||||
#endif
|
||||
|
||||
bool resolve_display_time(struct tm* out_tm)
|
||||
{
|
||||
@@ -60,6 +70,7 @@ bool resolve_display_time(struct tm* out_tm)
|
||||
|
||||
void present_boot_overlay_now()
|
||||
{
|
||||
#if TRAIL_MATE_BOOT_UI_SYNC_PRESENT
|
||||
for (uint8_t frame = 0; frame < kBootPresentFrameCount; ++frame)
|
||||
{
|
||||
if (lv_obj_t* top = lv_layer_top())
|
||||
@@ -73,6 +84,12 @@ void present_boot_overlay_now()
|
||||
sys::sleep_ms(kBootPresentFrameDelayMs);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (lv_obj_t* top = lv_layer_top())
|
||||
{
|
||||
lv_obj_invalidate(top);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user