Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 77afa48

Browse files
committed
log messages
1 parent 63c6054 commit 77afa48

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

components/ehmtx/EHMTX.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,37 @@ namespace esphome
5252
void EHMTX::set_today_color(int r, int g, int b)
5353
{
5454
this->today_color = Color((uint8_t)r & 248, (uint8_t)g & 252, (uint8_t)b & 248);
55-
ESP_LOGD("EHMTX", "Today r: %d g: %d b: %d", r, g, b);
55+
ESP_LOGD("EHMTX", "today color r: %d g: %d b: %d", r, g, b);
5656
}
5757

5858
void EHMTX::set_weekday_color(int r, int g, int b)
5959
{
6060
this->weekday_color = Color((uint8_t)r & 248, (uint8_t)g & 252, (uint8_t)b & 248);
61-
ESP_LOGD("EHMTX", "Weekday r: %d g: %d b: %d", r, g, b);
61+
ESP_LOGD("EHMTX", "weekday color: %d g: %d b: %d", r, g, b);
6262
}
6363

6464
void EHMTX::set_clock_color(int r, int g, int b)
6565
{
6666
this->clock_color = Color((uint8_t)r & 248, (uint8_t)g & 252, (uint8_t)b & 248);
67-
ESP_LOGD("EHMTX", "clock r: %d g: %d b: %d", r, g, b);
67+
ESP_LOGD("EHMTX", "clock color r: %d g: %d b: %d", r, g, b);
6868
}
6969

7070
void EHMTX::set_gauge_color(int r, int g, int b)
7171
{
7272
this->gauge_color = Color((uint8_t)r & 248, (uint8_t)g & 252, (uint8_t)b & 248);
73-
ESP_LOGD(TAG, "gauge r: %d g: %d b: %d", r, g, b);
73+
ESP_LOGD(TAG, "gauge color r: %d g: %d b: %d", r, g, b);
7474
}
7575

7676
void EHMTX::set_alarm_color(int r, int g, int b)
7777
{
7878
this->alarm_color = Color((uint8_t)r & 248, (uint8_t)g & 252, (uint8_t)b & 248);
79+
ESP_LOGD(TAG, "alarm color r: %d g: %d b: %d", r, g, b);
7980
}
8081

8182
void EHMTX::set_text_color(int r, int g, int b)
8283
{
8384
this->text_color = Color((uint8_t)r & 248, (uint8_t)g & 252, (uint8_t)b & 248);
85+
ESP_LOGD(TAG, "text color r: %d g: %d b: %d", r, g, b);
8486
}
8587

8688
uint8_t EHMTX::find_icon(std::string name)
@@ -121,7 +123,7 @@ namespace esphome
121123
{
122124
this->show_gauge = true;
123125
this->gauge_value = (uint8_t)(100 - val) * 7 / 100;
124-
ESP_LOGD(TAG, "gauge value: %d", this->gauge_value);
126+
ESP_LOGD(TAG, "gauge value: %d => %d",val, this->gauge_value);
125127
}
126128
}
127129

@@ -152,7 +154,7 @@ namespace esphome
152154
#ifdef USE_EHMTX_SELECT
153155
if (this->select != NULL)
154156
{
155-
ESP_LOGD(TAG, "use select_component");
157+
ESP_LOGD(TAG, "select_component activated");
156158
this->select->traits.set_options(this->select_options);
157159
this->select->parent = this;
158160
}
@@ -207,10 +209,8 @@ namespace esphome
207209
}
208210
else
209211
{
210-
ESP_LOGD(TAG, "next action: %d", this->next_action_time);
211212
ESP_LOGD(TAG, "next action: show screen for %d sec", this->store->current()->display_duration);
212213
this->next_action_time = ts + this->store->current()->display_duration;
213-
ESP_LOGD(TAG, "next action: %d", this->next_action_time);
214214
for (auto *t : on_next_screen_triggers_)
215215
{
216216
t->process(this->icons[this->store->current()->icon]->name, this->store->current()->text);
@@ -445,7 +445,7 @@ namespace esphome
445445
void EHMTX::add_icon(EHMTX_Icon *icon)
446446
{
447447
this->icons[this->icon_count] = icon;
448-
ESP_LOGD(TAG, "add_icon no.: %d name: %s duration: %d ", this->icon_count, icon->name.c_str(), icon->frame_duration);
448+
ESP_LOGD(TAG, "add_icon no.: %d name: %s frame_duration: %d ms", this->icon_count, icon->name.c_str(), icon->frame_duration);
449449
this->icon_count++;
450450

451451
#ifdef USE_EHMTX_SELECT

components/ehmtx/EHMTX_screen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ namespace esphome
114114
this->shiftx_ = 0;
115115
float dd = ceil((2 * (TEXTSTARTOFFSET + pixel) * this->config_->scroll_intervall) / 1000);
116116
this->display_duration = (dd > this->config_->screen_time) ? dd : this->config_->screen_time;
117-
ESP_LOGD(TAG, "display length text: %s pixels %d t: %d default: %d", text.c_str(),pixel, this->display_duration, this->config_->screen_time);
117+
ESP_LOGD(TAG, "display length text: %s pixels %d calculated: %d default: %d", text.c_str(),pixel, this->display_duration, this->config_->screen_time);
118118
this->endtime = this->config_->clock->now().timestamp + et * 60;
119119
this->icon = icon;
120120
}

0 commit comments

Comments
 (0)