Merge remote-tracking branch 'upstream/main' into mdev
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "wled",
|
||||
"version": "0.14.0-b1.16",
|
||||
"version": "0.14.0-b7.17",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wled",
|
||||
"version": "0.14.0-b1.16",
|
||||
"version": "0.14.0-b7.17",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"clean-css": "^4.2.3",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wled",
|
||||
"version": "0.14.0-b1.16",
|
||||
"version": "0.14.0-b7.17",
|
||||
"description": "Tools for WLED project",
|
||||
"main": "tools/cdata.js",
|
||||
"directories": {
|
||||
|
||||
@@ -661,7 +661,7 @@ build_flags_all =
|
||||
-D USERMOD_BH1750
|
||||
-D USERMOD_ANIMATED_STAIRCASE
|
||||
-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_MULTI_RELAY
|
||||
-D USERMOD_PIRSWITCH
|
||||
@@ -672,6 +672,7 @@ build_flags_all =
|
||||
-D USERMOD_BME280
|
||||
-D USERMOD_DHT
|
||||
-D USERMOD_VL53L0X_GESTURES
|
||||
-D WLED_ENABLE_PIXART
|
||||
|
||||
lib_deps_all =
|
||||
claws/BH1750 @^1.2.0 ; used for USERMOD_BH1750
|
||||
|
||||
@@ -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
|
||||
// in step 3 above) (Effect Intensity = Sparking).
|
||||
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
|
||||
byte* heat = SEGENV.data;
|
||||
|
||||
uint32_t it = strip.now >> 5; //div 32
|
||||
const uint32_t it = strip.now >> 6; //div 64
|
||||
|
||||
struct virtualStrip {
|
||||
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)
|
||||
{
|
||||
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
|
||||
for (int k = SEGLEN -1; k > 1; k--) {
|
||||
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
|
||||
if (random8() <= SEGMENT.intensity) {
|
||||
uint8_t y = random8(ignition);
|
||||
heat[y] = qadd8(heat[y], random8(160,255));
|
||||
}
|
||||
// Step 3. Randomly ignite new 'sparks' of heat near the bottom
|
||||
if (random8() <= SEGMENT.intensity) {
|
||||
uint8_t y = random8(ignition);
|
||||
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
|
||||
@@ -2011,12 +2011,14 @@ uint16_t mode_fire_2012() {
|
||||
for (int stripNr=0; stripNr<strips; stripNr++)
|
||||
virtualStrip::runStrip(stripNr, &heat[stripNr * SEGLEN], it);
|
||||
|
||||
if (SEGMENT.is2D()) SEGMENT.blur(32);
|
||||
|
||||
if (it != SEGENV.step)
|
||||
SEGENV.step = it;
|
||||
|
||||
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
|
||||
|
||||
@@ -189,7 +189,7 @@ void sendImprovInfoResponse() {
|
||||
out[11] = 4; //Firmware len ("WLED")
|
||||
out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D';
|
||||
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;
|
||||
uint8_t hlen = 7;
|
||||
#ifdef ESP8266
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
Main sketch, global variable declarations
|
||||
@title WLED project sketch
|
||||
@version 0.14.0-b1
|
||||
@version 0.14.0-b2
|
||||
@author Christian Schwinne
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user