Percent FX use % as index in palette.
FX Checkmark bugfix.
This commit is contained in:
parent
ad4870a59b
commit
de90e5b753
@ -3581,9 +3581,12 @@ uint16_t mode_percent(void) {
|
||||
uint8_t size = (1 + ((SEGMENT.speed * SEGLEN) >> 11));
|
||||
if (SEGMENT.speed == 255) size = 255;
|
||||
|
||||
if (percent < 100) {
|
||||
if (percent <= 100) {
|
||||
for (int i = 0; i < SEGLEN; i++) {
|
||||
if (i < SEGENV.aux1) {
|
||||
if (SEGMENT.check1)
|
||||
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(map(percent,0,100,0,255), false, false, 0));
|
||||
else
|
||||
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(i, true, PALETTE_SOLID_WRAP, 0));
|
||||
}
|
||||
else {
|
||||
@ -3596,6 +3599,9 @@ uint16_t mode_percent(void) {
|
||||
SEGMENT.setPixelColor(i, SEGCOLOR(1));
|
||||
}
|
||||
else {
|
||||
if (SEGMENT.check1)
|
||||
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(map(percent,100,200,255,0), false, false, 0));
|
||||
else
|
||||
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(i, true, PALETTE_SOLID_WRAP, 0));
|
||||
}
|
||||
}
|
||||
@ -3611,7 +3617,7 @@ uint16_t mode_percent(void) {
|
||||
|
||||
return FRAMETIME;
|
||||
}
|
||||
static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill;!,!,;!;1d";
|
||||
static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill,,,,One color;!,!,;!;1d";
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1395,7 +1395,7 @@ function setEffectParameters(idx)
|
||||
if (slOnOff.length>5) {
|
||||
gId('fxopt').classList.remove('fade');
|
||||
for (let i = 0; i<3; i++) {
|
||||
if (slOnOff[5+i]!=='') {
|
||||
if (5+i<slOnOff.length && slOnOff[5+i]!=='') {
|
||||
gId('opt'+i).classList.remove('hide');
|
||||
gId('optLabel'+i).innerHTML = slOnOff[5+i]=="!" ? 'Option' : slOnOff[5+i].substr(0,16);
|
||||
} else
|
||||
|
993
wled00/html_ui.h
993
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user