Skip to content

Commit

Permalink
2023.9.1: Add screen id for bitmap screen to events and log
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan committed Dec 24, 2023
1 parent 5fd3afa commit 4bf4e4d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions components/ehmtxv2/EHMTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,19 @@ namespace esphome
screen->pixels_ = 0;
screen->scroll_reset = 32;
#endif
for (auto *t : on_add_screen_triggers_)
if (id == "")
{
t->process("bitmap", (uint8_t)screen->mode);
for (auto *t : on_add_screen_triggers_)
{
t->process("bitmap", (uint8_t)screen->mode);
}
}
else
{
for (auto *t : on_add_screen_triggers_)
{
t->process("bitmap: " + id, (uint8_t)screen->mode);
}
}
ESP_LOGD(TAG, "bitmap screen: lifetime: %d screen_time: %d", lifetime, screen_time);
screen->status();
Expand Down Expand Up @@ -1016,7 +1026,7 @@ namespace esphome
infotext = ("bitmap small: " + this->queue[i]->icon_name).c_str();
break;
case MODE_BITMAP_SCREEN:
infotext = "bitmap";
infotext = ("bitmap: " + this->queue[i]->icon_name).c_str();
break;
case MODE_BITMAP_STACK_SCREEN:
infotext = ("bitmap stack: " + this->queue[i]->text).c_str();
Expand Down Expand Up @@ -1195,7 +1205,7 @@ namespace esphome
infotext = ("bitmap small: " + this->queue[this->screen_pointer]->icon_name).c_str();
break;
case MODE_BITMAP_SCREEN:
infotext = "bitmap";
infotext = ("bitmap: " + this->queue[this->screen_pointer]->icon_name).c_str();
break;
case MODE_BITMAP_STACK_SCREEN:
infotext = ("bitmap stack: " + this->queue[this->screen_pointer]->text).c_str();
Expand Down

0 comments on commit 4bf4e4d

Please sign in to comment.