fix: Enhance UI setup across multiple boards (#1753)

* chore: Update component versions and enhance UI setup across multiple boards

- Bumped uart-eth-modem version from ~0.3.2 to ~0.3.3 in idf_component.yml.
- Added SetupUI method to various display classes to ensure proper UI initialization before usage.
- Improved error handling in display classes to prevent issues when UI is not set up.
- Ensured UI customization is performed in SetupUI rather than constructors for better reliability.

* remove pm config code
This commit is contained in:
Xiaoxia
2026-02-09 19:13:14 +08:00
committed by GitHub
parent 9215a04a7e
commit d9447ad060
30 changed files with 231 additions and 24 deletions

View File

@ -39,6 +39,13 @@ public:
bool swap_xy)
: SpiLcdDisplay(io_handle, panel_handle, width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy)
{
// Note: UI customization should be done in SetupUI(), not in constructor
// to ensure lvgl objects are created before accessing them
}
virtual void SetupUI() override {
// Call parent SetupUI() first to create all lvgl objects
SpiLcdDisplay::SetupUI();
DisplayLockGuard lock(this);
@ -49,7 +56,6 @@ public:
lv_obj_align(emoji_box_, LV_ALIGN_CENTER, 0, -50); // 向上偏移50
// 消息栏适配
lv_obj_align(bottom_bar_, LV_ALIGN_BOTTOM_MID, 0, -40); // 向上偏移40
}
};