Fix ESP logging tags.

This commit is contained in:
Shaun Reed 2025-02-16 14:40:53 -05:00
parent e2bb406139
commit 25b4564a8b
6 changed files with 24 additions and 3 deletions

View File

@ -17,6 +17,9 @@ _lock_t Display::ScopedLock::lv_lock_;
// Static TimeKeeper for managing ESP timers across all displays. // Static TimeKeeper for managing ESP timers across all displays.
TimeKeeper Display::timers_; TimeKeeper Display::timers_;
/// Tag used for ESP logging.
const char * TAG = "Display";
Display::Display(IPanelDevice &device) : Display::Display(IPanelDevice &device) :
panel_(device), panel_(device),
lv_buf_(nullptr) lv_buf_(nullptr)

View File

@ -5,9 +5,6 @@
#include <driver/i2c_master.h> #include <driver/i2c_master.h>
// TODO: Refactor tags for-each class.
static const char *TAG = "lcd-panel";
/** /**
* Encapsulates ESP I2C creation and usage. * Encapsulates ESP I2C creation and usage.
*/ */
@ -68,6 +65,10 @@ struct I2C {
/// RST GPIO pin number. /// RST GPIO pin number.
int rst_num_; int rst_num_;
private:
/// Tag used for ESP logging.
const char * TAG = "I2C";
}; };
#endif //I2C_H #endif //I2C_H

View File

@ -53,6 +53,10 @@ struct Panel {
/// ESP LCD panel configuration structure. /// ESP LCD panel configuration structure.
esp_lcd_panel_dev_config_t esp_panel_config_; esp_lcd_panel_dev_config_t esp_panel_config_;
private:
/// Tag used for ESP logging.
const char * TAG = "Panel";
}; };
#endif //PANEL_H #endif //PANEL_H

View File

@ -146,6 +146,9 @@ private:
virtual void init_panel(esp_lcd_panel_dev_config_t &config, virtual void init_panel(esp_lcd_panel_dev_config_t &config,
esp_lcd_panel_io_handle_t io, esp_lcd_panel_io_handle_t io,
esp_lcd_panel_handle_t &panel) = 0; esp_lcd_panel_handle_t &panel) = 0;
/// Tag used for ESP logging.
const char * TAG = "IPanelDevice";
}; };
#endif // PANEL_DEVICE_H #endif // PANEL_DEVICE_H

View File

@ -102,6 +102,9 @@ private:
{ {
ESP_ERROR_CHECK(esp_lcd_new_panel_ssd1306(io, &config, &panel)); ESP_ERROR_CHECK(esp_lcd_new_panel_ssd1306(io, &config, &panel));
} }
/// Tag used for ESP logging.
const char * TAG = "SSD1306";
}; };
#endif // SSD1306_H #endif // SSD1306_H

View File

@ -41,6 +41,10 @@ struct Timer {
/// ESP timer handle. /// ESP timer handle.
esp_timer_handle_t esp_timer_; esp_timer_handle_t esp_timer_;
private:
/// Tag used for ESP logging.
const char * TAG = "Timer";
}; };
/** /**
@ -126,6 +130,9 @@ struct TimeKeeper {
private: private:
/// Existing ESP timers created for this TimeKeeper instance. /// Existing ESP timers created for this TimeKeeper instance.
std::unordered_map<const char *, Timer> managed_timers_; std::unordered_map<const char *, Timer> managed_timers_;
/// Tag used for ESP logging.
const char * TAG = "TimeKeeper";
}; };
#endif // TIME_KEEPER_H #endif // TIME_KEEPER_H