minor speedups

* added IRAM_ATTR_YN to some frequently used color functions
* small optimization for fade_out: pixel already has "target color"
This commit is contained in:
Frank
2023-07-21 15:59:32 +02:00
parent 5707d85ed5
commit 4984c578cc
3 changed files with 4 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ void toggleOnOff()
//scales the brightness with the briMultiplier factor
byte scaledBri(byte in)
IRAM_ATTR_YN byte scaledBri(byte in) // WLEDMM added IRAM_ATTR_YN
{
if (briMultiplier == 100) return(in); // WLEDMM shortcut
uint_fast16_t val = ((uint_fast16_t)in*(uint_fast16_t)briMultiplier)/100; // WLEDMM