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:
@ -40,14 +40,18 @@ public:
|
||||
virtual Theme* GetTheme() { return current_theme_; }
|
||||
virtual void UpdateStatusBar(bool update_all = false);
|
||||
virtual void SetPowerSaveMode(bool on);
|
||||
virtual void SetupUI() { }
|
||||
virtual void SetupUI() {
|
||||
setup_ui_called_ = true;
|
||||
}
|
||||
|
||||
inline int width() const { return width_; }
|
||||
inline int height() const { return height_; }
|
||||
inline bool IsSetupUICalled() const { return setup_ui_called_; }
|
||||
|
||||
protected:
|
||||
int width_ = 0;
|
||||
int height_ = 0;
|
||||
bool setup_ui_called_ = false; // Track if SetupUI() has been called
|
||||
|
||||
Theme* current_theme_ = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user