tiny optimization

* use bitmask operations in getBitFromArray, setBitInArray
* make currentBri "const"
This commit is contained in:
Frank
2025-01-17 21:13:27 +01:00
parent 7bf7ac0c33
commit 2c0063dc5b
3 changed files with 6 additions and 6 deletions

View File

@@ -464,7 +464,7 @@ uint16_t IRAM_ATTR_YN Segment::progress() const {
// WLEDMM Segment::currentBri() is declared inline, see FX.h
#if 0
uint8_t IRAM_ATTR_YN Segment::currentBri(uint8_t briNew, bool useCct) {
uint8_t IRAM_ATTR_YN Segment::currentBri(uint8_t briNew, bool useCct) const {
uint32_t prog = (transitional && _t) ? progress() : 0xFFFFU;
if (transitional && _t && prog < 0xFFFFU) {
if (useCct) return ((briNew * prog) + _t->_cctT * (0xFFFFU - prog)) >> 16;