Filter/sort bugfix

This commit is contained in:
Blaz Kristan 2024-06-04 17:05:11 +02:00
parent c10ec2962b
commit 25ade86994
2 changed files with 4 additions and 5 deletions

View File

@ -458,7 +458,7 @@ static const char _data_FX_MODE_RAINBOW_CYCLE[] PROGMEM = "Rainbow@!,Size;;!";
* Alternating pixels running function. * Alternating pixels running function.
*/ */
static uint16_t running(uint32_t color1, uint32_t color2, bool theatre = false) { static uint16_t running(uint32_t color1, uint32_t color2, bool theatre = false) {
unsigned width = (theatre ? 3 : 1) + (SEGMENT.intensity >> 4); // window int width = (theatre ? 3 : 1) + (SEGMENT.intensity >> 4); // window
uint32_t cycleTime = 50 + (255 - SEGMENT.speed); uint32_t cycleTime = 50 + (255 - SEGMENT.speed);
uint32_t it = strip.now / cycleTime; uint32_t it = strip.now / cycleTime;
bool usePalette = color1 == SEGCOLOR(0); bool usePalette = color1 == SEGCOLOR(0);
@ -3351,7 +3351,7 @@ uint16_t candle(bool multi)
if (fadeStep == 0) fadeStep = 1; if (fadeStep == 0) fadeStep = 1;
} }
if (i > 0) { if (i > 0) {
SEGMENT.setPixelColor(i, color_blend(SEGCOLOR(1), SEGMENT.color_from_palette(i, true, PALETTE_SOLID_WRAP, 0), s)); SEGMENT.setPixelColor(i, color_blend(SEGCOLOR(1), SEGMENT.color_from_palette(i, true, PALETTE_SOLID_WRAP, 0), s));
SEGENV.data[d] = s; SEGENV.data[d+1] = s_target; SEGENV.data[d+2] = fadeStep; SEGENV.data[d] = s; SEGENV.data[d+1] = s_target; SEGENV.data[d+2] = fadeStep;

View File

@ -2827,9 +2827,8 @@ function search(field, listId = null) {
// restore default preset sorting if no search term is entered // restore default preset sorting if no search term is entered
if (!search) { if (!search) {
if (listId === 'pcont') populatePresets(); if (listId === 'pcont') { populatePresets(); return; }
if (listId === 'pallist') populatePalettes(); if (listId === 'pallist') { populatePalettes(); return; }
return;
} }
// clear filter if searching in fxlist // clear filter if searching in fxlist