Skip to content

Commit

Permalink
2024.0.1: Date regex - fix, info_lcolor - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan committed Jan 8, 2024
1 parent ff4a5c0 commit 68c11e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/ehmtxv2/EHMTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ namespace esphome

bool EHMTX::draw_date(std::string format, esphome::display::BaseFont *font, Color color, int xpos, int ypos)
{
std::regex rgx{"^(%\D)(.)(%\D)(.)?(?:(%\D)(.)?)?$"};
std::regex rgx{"^(%\\D)(.+)(%\\D)(.+)?(?:(%\\D)(.+)?)?$"};
std::smatch match;
if (!std::regex_search(format, match, rgx))
return false;
Expand Down
4 changes: 2 additions & 2 deletions components/ehmtxv2/EHMTX_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,14 +725,14 @@ namespace esphome
if (this->icon_name.find("day") != std::string::npos || this->icon_name.find("weekday") != std::string::npos)
{
int8_t i_y_offset = this->config_->info_y_offset;
Color i_lcolor = this->config_->info_rcolor;
Color i_lcolor = this->config_->info_lcolor;
Color i_rcolor = this->config_->info_rcolor;

#ifdef EHMTXv2_ADV_CLOCK
if (this->mode == MODE_ICON_CLOCK)
{
i_y_offset = this->config_->info_clock_y_offset;
i_lcolor = this->config_->info_clock_rcolor;
i_lcolor = this->config_->info_clock_lcolor;
i_rcolor = this->config_->info_clock_rcolor;
info_font = this->config_->info_clock_font ? this->config_->default_font : this->config_->special_font;
}
Expand Down

0 comments on commit 68c11e8

Please sign in to comment.