Skip to content

Commit

Permalink
Merge pull request lubeda#141 from andrewjswan/2023.9.1
Browse files Browse the repository at this point in the history
2023.9.1: Narrowed the green range, according to FastLED rainbow map and Show icon delimiter in MODE_ICON_PROGRESS only if icon not blank
  • Loading branch information
lubeda authored Nov 10, 2023
2 parents c3350db + 8222e70 commit 3442533
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/ehmtxv2/EHMTX_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,22 +721,22 @@ namespace esphome
#endif
if (this->mode == MODE_ICON_PROGRESS)
{
this->config_->display->line(8, 0, 8, 7, esphome::display::COLOR_OFF);
if (this->icon != BLANKICON)
{
this->config_->display->line(8, 0, 8, 7, esphome::display::COLOR_OFF);
this->config_->display->image(0, 0, this->config_->icons[this->icon]);
}

this->config_->display->line(9, 7, 31, 7, this->progressbar_back_color);
if (this->progress != 0)
{
if (this->progressbar_color == esphome::display::COLOR_OFF)
{
color_ = esphome::light::ESPHSVColor(this->progress * 120 / 100 + (this->progress < 0 ? 120 : 0), 255, 240).to_rgb();
color_ = esphome::light::ESPHSVColor(this->progress * 96 / 100 + (this->progress < 0 ? 96 : 0), 255, 240).to_rgb();
}
else
{
color_ = this->progressbar_color;
this->config_->display->line(9, 7, 31, 7, this->progressbar_back_color);
}
this->config_->display->line(9, 7, 9 + abs(this->progress) * 22 / 100, 7, color_);
}
Expand Down

0 comments on commit 3442533

Please sign in to comment.