mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 04:33:49 +01:00
Reduce ESP_LOGCONFIG calls (#9026)
This commit is contained in:
@@ -36,14 +36,18 @@ void GraphicalDisplayMenu::setup() {
|
||||
}
|
||||
|
||||
void GraphicalDisplayMenu::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "Graphical Display Menu");
|
||||
ESP_LOGCONFIG(TAG, "Has Display: %s", YESNO(this->display_ != nullptr));
|
||||
ESP_LOGCONFIG(TAG, "Popup Mode: %s", YESNO(this->display_ != nullptr));
|
||||
ESP_LOGCONFIG(TAG, "Advanced Drawing Mode: %s", YESNO(this->display_ == nullptr));
|
||||
ESP_LOGCONFIG(TAG, "Has Font: %s", YESNO(this->font_ != nullptr));
|
||||
ESP_LOGCONFIG(TAG, "Mode: %s", this->mode_ == display_menu_base::MENU_MODE_ROTARY ? "Rotary" : "Joystick");
|
||||
ESP_LOGCONFIG(TAG, "Active: %s", YESNO(this->active_));
|
||||
ESP_LOGCONFIG(TAG, "Menu items:");
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"Graphical Display Menu\n"
|
||||
"Has Display: %s\n"
|
||||
"Popup Mode: %s\n"
|
||||
"Advanced Drawing Mode: %s\n"
|
||||
"Has Font: %s\n"
|
||||
"Mode: %s\n"
|
||||
"Active: %s\n"
|
||||
"Menu items:",
|
||||
YESNO(this->display_ != nullptr), YESNO(this->display_ != nullptr), YESNO(this->display_ == nullptr),
|
||||
YESNO(this->font_ != nullptr),
|
||||
this->mode_ == display_menu_base::MENU_MODE_ROTARY ? "Rotary" : "Joystick", YESNO(this->active_));
|
||||
for (size_t i = 0; i < this->displayed_item_->items_size(); i++) {
|
||||
auto *item = this->displayed_item_->get_item(i);
|
||||
ESP_LOGCONFIG(TAG, " %i: %s (Type: %s, Immediate Edit: %s)", i, item->get_text().c_str(),
|
||||
|
||||
Reference in New Issue
Block a user