Merge branch '0_14' of https://github.com/aircoookie/WLED into dev

This commit is contained in:
Blaz Kristan 2022-09-12 22:39:00 +02:00
commit a1dc7a52e9
5 changed files with 1900 additions and 1894 deletions

View File

@ -1982,7 +1982,7 @@ uint16_t mode_fire_2012()
uint8_t cool = random8((((20 + SEGMENT.speed/3) * 16) / SEGLEN)+2);
uint8_t minTemp = 0;
if (i<ignition) {
cool /= (ignition-i)/3 + 1; // ignition area cools slower
//cool /= (ignition-i)/3 + 1; // ignition area cools slower
minTemp = (ignition-i)/4 + 16; // and should not become black
}
uint8_t temp = qsub8(heat[i], cool);
@ -2290,7 +2290,7 @@ uint16_t mode_meteor() {
{
byte meteorTrailDecay = 128 + random8(127);
trail[i] = scale8(trail[i], meteorTrailDecay);
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(trail[i], false, true, 255));
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(i, true, false, 0, trail[i]));
}
}
@ -2298,16 +2298,15 @@ uint16_t mode_meteor() {
for (int j = 0; j < meteorSize; j++) {
uint16_t index = in + j;
if (index >= SEGLEN) {
index = (in + j - SEGLEN);
index -= SEGLEN;
}
trail[index] = 240;
SEGMENT.setPixelColor(index, SEGMENT.color_from_palette(trail[index], false, true, 255));
SEGMENT.setPixelColor(index, SEGMENT.color_from_palette(index, true, false, 0, 255));
}
return FRAMETIME;
}
static const char _data_FX_MODE_METEOR[] PROGMEM = "Meteor@!,Trail length;!,!,;!;1d";
static const char _data_FX_MODE_METEOR[] PROGMEM = "Meteor@!,Trail length;!,,;!;1d";
// smooth meteor effect
@ -2329,24 +2328,24 @@ uint16_t mode_meteor_smooth() {
trail[i] += change;
if (trail[i] > 245) trail[i] = 0;
if (trail[i] > 240) trail[i] = 240;
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(trail[i], false, true, 255));
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(i, true, false, 0, trail[i]));
}
}
// draw meteor
for (int j = 0; j < meteorSize; j++) {
uint16_t index = in + j;
if(in + j >= SEGLEN) {
index = (in + j - SEGLEN);
if (index >= SEGLEN) {
index -= SEGLEN;
}
SEGMENT.setPixelColor(index, color_blend(SEGMENT.getPixelColor(index), SEGMENT.color_from_palette(240, false, true, 255), 48));
trail[index] = 240;
SEGMENT.setPixelColor(index, SEGMENT.color_from_palette(index, true, false, 0, 255));
}
SEGENV.step += SEGMENT.speed +1;
return FRAMETIME;
}
static const char _data_FX_MODE_METEOR_SMOOTH[] PROGMEM = "Meteor Smooth@!,Trail length;!,!,;!;1d";
static const char _data_FX_MODE_METEOR_SMOOTH[] PROGMEM = "Meteor Smooth@!,Trail length;!,,;!;1d";
//Railway Crossing / Christmas Fairy lights
@ -7209,7 +7208,7 @@ static uint8_t akemi[] PROGMEM = {
0,0,0,0,0,0,0,3,2,0,6,5,5,5,5,5,5,5,5,5,5,4,0,2,3,0,0,0,0,0,0,0,
0,0,0,0,0,0,3,2,3,6,5,5,7,7,5,5,5,5,7,7,5,5,4,3,2,3,0,0,0,0,0,0,
0,0,0,0,0,2,3,1,3,6,5,1,7,7,7,5,5,1,7,7,7,5,4,3,1,3,2,0,0,0,0,0,
0,0,0,0,0,8,3,1,3,6,5,1,7,7,7,5,5,1,7,7,7,5,4,3,1,3,8,9,0,0,0,0,
0,0,0,0,0,8,3,1,3,6,5,1,7,7,7,5,5,1,7,7,7,5,4,3,1,3,8,0,0,0,0,0,
0,0,0,0,0,8,3,1,3,6,5,5,1,1,5,5,5,5,1,1,5,5,4,3,1,3,8,0,0,0,0,0,
0,0,0,0,0,2,3,1,3,6,5,5,5,5,5,5,5,5,5,5,5,5,4,3,1,3,2,0,0,0,0,0,
0,0,0,0,0,0,3,2,3,6,5,5,5,5,5,5,5,5,5,5,5,5,4,3,2,3,0,0,0,0,0,0,
@ -7259,7 +7258,6 @@ uint16_t mode_2DAkemi(void) {
CRGB armsAndLegsColor = SEGCOLOR(1) > 0 ? SEGCOLOR(1) : 0xFFE0A0; //default warmish white 0xABA8FF; //0xFF52e5;//
uint8_t ak = pgm_read_byte_near(akemi + ((y * 32)/rows) * 32 + (x * 32)/cols); // akemi[(y * 32)/rows][(x * 32)/cols]
switch (ak) {
case 0: color = BLACK; break;
case 3: armsAndLegsColor.r *= lightFactor; armsAndLegsColor.g *= lightFactor; armsAndLegsColor.b *= lightFactor; color = armsAndLegsColor; break; //light arms and legs 0x9B9B9B
case 2: armsAndLegsColor.r *= normalFactor; armsAndLegsColor.g *= normalFactor; armsAndLegsColor.b *= normalFactor; color = armsAndLegsColor; break; //normal arms and legs 0x888888
case 1: color = armsAndLegsColor; break; //dark arms and legs 0x686868
@ -7268,7 +7266,7 @@ uint16_t mode_2DAkemi(void) {
case 4: color = faceColor; break; //dark face 0x007DC6
case 7: color = SEGCOLOR(2) > 0 ? SEGCOLOR(2) : 0xFFFFFF; break; //eyes and mouth default white
case 8: if (base > 0.4) {soundColor.r *= base; soundColor.g *= base; soundColor.b *= base; color=soundColor;} else color = armsAndLegsColor; break;
default: color = BLACK;
default: color = BLACK; break;
}
if (SEGMENT.intensity > 128 && fftResult && fftResult[0] > 128) { //dance if base is high

View File

@ -104,7 +104,7 @@ button {
color: var(--c-d); /* must remain bright with dark shadow (see below) to be legible on gray background */
cursor: pointer;
writing-mode: vertical-rl;
transform: rotate(180deg);
/* transform: rotate(180deg); */
}
.bri {

View File

@ -594,7 +594,9 @@ function parseInfo(i) {
lastinfo = i;
var name = i.name;
gId('namelabel').innerHTML = name;
//if (name === "Dinnerbone") d.documentElement.style.transform = "rotate(180deg)";
if (!name.match(/[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f\u3131-\uD79D]/))
gId('namelabel').style.transform = "rotate(180deg)"; // rotate if no CJK characters
if (name === "Dinnerbone") d.documentElement.style.transform = "rotate(180deg)"; // Minecraft easter egg
if (i.live) name = "(Live) " + name;
if (loc) name = "(L) " + name;
d.title = name;

File diff suppressed because it is too large Load Diff

View File

@ -290,7 +290,7 @@ WLED_GLOBAL byte bootPreset _INIT(0); // save preset to load
WLED_GLOBAL bool autoSegments _INIT(false);
WLED_GLOBAL bool correctWB _INIT(false); // CCT color correction of RGB color
WLED_GLOBAL bool cctFromRgb _INIT(false); // CCT is calculated from RGB instead of using seg.cct
WLED_GLOBAL bool gammaCorrectCol _INIT(false); // use gamma correction on colors
WLED_GLOBAL bool gammaCorrectCol _INIT(true ); // use gamma correction on colors
WLED_GLOBAL bool gammaCorrectBri _INIT(false); // use gamma correction on brightness
WLED_GLOBAL byte col[] _INIT_N(({ 255, 160, 0, 0 })); // current RGB(W) primary color. col[] should be updated if you want to change the color.