firmware/main: For breathe mode, allow earlier OverBright re-use

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2023-03-20 15:20:07 +01:00
parent 69d8da7f2a
commit 2277549293
1 changed files with 3 additions and 3 deletions

View File

@ -277,9 +277,9 @@ la_breathe_render(void *state, uint16_t *leds,
s->leds[i].pha = pha;
/* Early OverBright release */
/* After pha >= 40000, we're not overbright anyway, so
* allow another led to use it early */
if (s->leds[i].ob && (s->leds[i].pha > 40000)) {
/* After pha >= 28000, we know that it's safe to allow a new overbright led
* because we'll be past the peak by the time they start needing overbright */
if (s->leds[i].ob && (s->leds[i].pha > 28000)) {
s->leds[i].ob = false;
s->n_ob--;
}