Merge remote-tracking branch 'upstream/main' into mdev

This commit is contained in:
Ewoud
2023-01-24 21:40:55 +01:00
6 changed files with 31 additions and 28 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "wled", "name": "wled",
"version": "0.14.0-b1.16", "version": "0.14.0-b7.17",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "wled", "name": "wled",
"version": "0.14.0-b1.16", "version": "0.14.0-b7.17",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"clean-css": "^4.2.3", "clean-css": "^4.2.3",

View File

@@ -1,6 +1,6 @@
{ {
"name": "wled", "name": "wled",
"version": "0.14.0-b1.16", "version": "0.14.0-b7.17",
"description": "Tools for WLED project", "description": "Tools for WLED project",
"main": "tools/cdata.js", "main": "tools/cdata.js",
"directories": { "directories": {

View File

@@ -661,7 +661,7 @@ build_flags_all =
-D USERMOD_BH1750 -D USERMOD_BH1750
-D USERMOD_ANIMATED_STAIRCASE -D USERMOD_ANIMATED_STAIRCASE
-D USERMOD_RTC ;; experimental -D USERMOD_RTC ;; experimental
; -D USERMOD_SENSORSTOMQTT ;; experimental ewpwi causes error: fatal error: Adafruit_Sensor.h: No such file or directory ; -D USERMOD_SENSORSTOMQTT ;; experimental ewowi causes error: fatal error: Adafruit_Sensor.h: No such file or directory
-D USERMOD_ANALOG_CLOCK -D USERMOD_ANALOG_CLOCK
-D USERMOD_MULTI_RELAY -D USERMOD_MULTI_RELAY
-D USERMOD_PIRSWITCH -D USERMOD_PIRSWITCH
@@ -672,6 +672,7 @@ build_flags_all =
-D USERMOD_BME280 -D USERMOD_BME280
-D USERMOD_DHT -D USERMOD_DHT
-D USERMOD_VL53L0X_GESTURES -D USERMOD_VL53L0X_GESTURES
-D WLED_ENABLE_PIXART
lib_deps_all = lib_deps_all =
claws/BH1750 @^1.2.0 ; used for USERMOD_BH1750 claws/BH1750 @^1.2.0 ; used for USERMOD_BH1750

View File

@@ -1964,41 +1964,41 @@ static const char _data_FX_MODE_PALETTE[] PROGMEM = "Palette@Cycle speed;;!;;c3=
// feel of your fire: COOLING (used in step 1 above) (Speed = COOLING), and SPARKING (used // feel of your fire: COOLING (used in step 1 above) (Speed = COOLING), and SPARKING (used
// in step 3 above) (Effect Intensity = Sparking). // in step 3 above) (Effect Intensity = Sparking).
uint16_t mode_fire_2012() { uint16_t mode_fire_2012() {
uint16_t strips = SEGMENT.nrOfVStrips(); const uint16_t strips = SEGMENT.nrOfVStrips();
if (!SEGENV.allocateData(strips * SEGLEN)) return mode_static(); //allocation failed if (!SEGENV.allocateData(strips * SEGLEN)) return mode_static(); //allocation failed
byte* heat = SEGENV.data; byte* heat = SEGENV.data;
uint32_t it = strip.now >> 5; //div 32 const uint32_t it = strip.now >> 6; //div 64
struct virtualStrip { struct virtualStrip {
static void runStrip(uint16_t stripNr, byte* heat, uint32_t it) { static void runStrip(uint16_t stripNr, byte* heat, uint32_t it) {
const uint8_t ignition = max(3,SEGLEN/10); // ignition area: 10% of segment length or minimum 3 pixels
// Step 1. Cool down every cell a little
for (int i = 0; i < SEGLEN; i++) {
uint8_t cool = (it != SEGENV.step) ? random8((((20 + SEGMENT.speed/3) * 16) / SEGLEN)+2) : random(8);
uint8_t minTemp = 0;
if (i<ignition) {
minTemp = (ignition-i)/4 + 16; // and should not become black
}
uint8_t temp = qsub8(heat[i], cool);
heat[i] = temp<minTemp ? minTemp : temp;
}
if (it != SEGENV.step) if (it != SEGENV.step)
{ {
uint8_t ignition = max(3,SEGLEN/10); // ignition area: 10% of segment length or minimum 3 pixels
// Step 1. Cool down every cell a little
for (int i = 0; i < SEGLEN; i++) {
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
minTemp = (ignition-i)/4 + 16; // and should not become black
}
uint8_t temp = qsub8(heat[i], cool);
heat[i] = temp<minTemp ? minTemp : temp;
}
// Step 2. Heat from each cell drifts 'up' and diffuses a little // Step 2. Heat from each cell drifts 'up' and diffuses a little
for (int k = SEGLEN -1; k > 1; k--) { for (int k = SEGLEN -1; k > 1; k--) {
heat[k] = (heat[k - 1] + (heat[k - 2]<<1) ) / 3; // heat[k-2] multiplied by 2 heat[k] = (heat[k - 1] + (heat[k - 2]<<1) ) / 3; // heat[k-2] multiplied by 2
} }
}
// Step 3. Randomly ignite new 'sparks' of heat near the bottom // Step 3. Randomly ignite new 'sparks' of heat near the bottom
if (random8() <= SEGMENT.intensity) { if (random8() <= SEGMENT.intensity) {
uint8_t y = random8(ignition); uint8_t y = random8(ignition);
heat[y] = qadd8(heat[y], random8(160,255)); uint8_t boost = (32+SEGMENT.custom3*2) * (2*ignition-y) / (2*ignition);
} heat[y] = qadd8(heat[y], random8(64+boost,128+boost));
} }
// Step 4. Map from heat cells to LED colors // Step 4. Map from heat cells to LED colors
@@ -2011,12 +2011,14 @@ uint16_t mode_fire_2012() {
for (int stripNr=0; stripNr<strips; stripNr++) for (int stripNr=0; stripNr<strips; stripNr++)
virtualStrip::runStrip(stripNr, &heat[stripNr * SEGLEN], it); virtualStrip::runStrip(stripNr, &heat[stripNr * SEGLEN], it);
if (SEGMENT.is2D()) SEGMENT.blur(32);
if (it != SEGENV.step) if (it != SEGENV.step)
SEGENV.step = it; SEGENV.step = it;
return FRAMETIME; return FRAMETIME;
} }
static const char _data_FX_MODE_FIRE_2012[] PROGMEM = "Fire 2012@Cooling,Spark rate;;!;1.5d;pal=0,sx=120,ix=64,m12=1"; // bars WLEDMM 1.5d, pal = 0 static const char _data_FX_MODE_FIRE_2012[] PROGMEM = "Fire 2012@Cooling,Spark rate,,,Boost;;!;1.5d;pal=0,sx=120,ix=64,m12=1"; // bars WLEDMM 1.5d, pal = 0
// ColorWavesWithPalettes by Mark Kriegsman: https://gist.github.com/kriegsman/8281905786e8b2632aeb // ColorWavesWithPalettes by Mark Kriegsman: https://gist.github.com/kriegsman/8281905786e8b2632aeb

View File

@@ -189,7 +189,7 @@ void sendImprovInfoResponse() {
out[11] = 4; //Firmware len ("WLED") out[11] = 4; //Firmware len ("WLED")
out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D'; out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D';
uint8_t lengthSum = 17; uint8_t lengthSum = 17;
uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b1.16/%i"),VERSION); uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b7.17/%i"),VERSION);
out[16] = vlen; lengthSum += vlen; out[16] = vlen; lengthSum += vlen;
uint8_t hlen = 7; uint8_t hlen = 7;
#ifdef ESP8266 #ifdef ESP8266

View File

@@ -3,7 +3,7 @@
/* /*
Main sketch, global variable declarations Main sketch, global variable declarations
@title WLED project sketch @title WLED project sketch
@version 0.14.0-b1 @version 0.14.0-b2
@author Christian Schwinne @author Christian Schwinne
*/ */