Skip to content

Commit

Permalink
2023.9.1-129: Turn off blend_step at low brightness (50%)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan committed Nov 4, 2023
1 parent e4ba41d commit 1faca54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/ehmtxv2/EHMTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,10 +896,10 @@ namespace esphome
}
}
}
// blend handling

// blend handling
#ifdef EHMTXv2_BLEND_STEPS
if ((this->ticks_ <= EHMTXv2_BLEND_STEPS) && (this->queue_count() > 1))
if ((this->queue_count() > 1) && (this->brightness_ >= 50) && (this->ticks_ <= EHMTXv2_BLEND_STEPS))
{
uint8_t b = this->brightness_;
float br = lerp((float)this->ticks_ / EHMTXv2_BLEND_STEPS, 0, (float)b / 255);
Expand Down

0 comments on commit 1faca54

Please sign in to comment.