Skip to content

Commit 1b3952c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into mdev
2 parents 9894ae7 + 8e7b1c9 commit 1b3952c

File tree

6 files changed

+31
-28
lines changed

6 files changed

+31
-28
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wled",
3-
"version": "0.14.0-b1.16",
3+
"version": "0.14.0-b7.17",
44
"description": "Tools for WLED project",
55
"main": "tools/cdata.js",
66
"directories": {

platformio.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ build_flags_all =
661661
-D USERMOD_BH1750
662662
-D USERMOD_ANIMATED_STAIRCASE
663663
-D USERMOD_RTC ;; experimental
664-
; -D USERMOD_SENSORSTOMQTT ;; experimental ewpwi causes error: fatal error: Adafruit_Sensor.h: No such file or directory
664+
; -D USERMOD_SENSORSTOMQTT ;; experimental ewowi causes error: fatal error: Adafruit_Sensor.h: No such file or directory
665665
-D USERMOD_ANALOG_CLOCK
666666
-D USERMOD_MULTI_RELAY
667667
-D USERMOD_PIRSWITCH
@@ -672,6 +672,7 @@ build_flags_all =
672672
-D USERMOD_BME280
673673
-D USERMOD_DHT
674674
-D USERMOD_VL53L0X_GESTURES
675+
-D WLED_ENABLE_PIXART
675676

676677
lib_deps_all =
677678
claws/BH1750 @^1.2.0 ; used for USERMOD_BH1750

wled00/FX.cpp

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,41 +1964,41 @@ static const char _data_FX_MODE_PALETTE[] PROGMEM = "Palette@Cycle speed;;!;;c3=
19641964
// feel of your fire: COOLING (used in step 1 above) (Speed = COOLING), and SPARKING (used
19651965
// in step 3 above) (Effect Intensity = Sparking).
19661966
uint16_t mode_fire_2012() {
1967-
uint16_t strips = SEGMENT.nrOfVStrips();
1967+
const uint16_t strips = SEGMENT.nrOfVStrips();
19681968
if (!SEGENV.allocateData(strips * SEGLEN)) return mode_static(); //allocation failed
19691969
byte* heat = SEGENV.data;
19701970

1971-
uint32_t it = strip.now >> 5; //div 32
1971+
const uint32_t it = strip.now >> 6; //div 64
19721972

19731973
struct virtualStrip {
19741974
static void runStrip(uint16_t stripNr, byte* heat, uint32_t it) {
19751975

1976-
if (it != SEGENV.step)
1977-
{
1978-
uint8_t ignition = max(3,SEGLEN/10); // ignition area: 10% of segment length or minimum 3 pixels
1979-
1980-
// Step 1. Cool down every cell a little
1981-
for (int i = 0; i < SEGLEN; i++) {
1982-
uint8_t cool = random8((((20 + SEGMENT.speed/3) * 16) / SEGLEN)+2);
1983-
uint8_t minTemp = 0;
1984-
if (i<ignition) {
1985-
//cool /= (ignition-i)/3 + 1; // ignition area cools slower
1986-
minTemp = (ignition-i)/4 + 16; // and should not become black
1987-
}
1988-
uint8_t temp = qsub8(heat[i], cool);
1989-
heat[i] = temp<minTemp ? minTemp : temp;
1976+
const uint8_t ignition = max(3,SEGLEN/10); // ignition area: 10% of segment length or minimum 3 pixels
1977+
1978+
// Step 1. Cool down every cell a little
1979+
for (int i = 0; i < SEGLEN; i++) {
1980+
uint8_t cool = (it != SEGENV.step) ? random8((((20 + SEGMENT.speed/3) * 16) / SEGLEN)+2) : random(8);
1981+
uint8_t minTemp = 0;
1982+
if (i<ignition) {
1983+
minTemp = (ignition-i)/4 + 16; // and should not become black
19901984
}
1985+
uint8_t temp = qsub8(heat[i], cool);
1986+
heat[i] = temp<minTemp ? minTemp : temp;
1987+
}
19911988

1989+
if (it != SEGENV.step)
1990+
{
19921991
// Step 2. Heat from each cell drifts 'up' and diffuses a little
19931992
for (int k = SEGLEN -1; k > 1; k--) {
19941993
heat[k] = (heat[k - 1] + (heat[k - 2]<<1) ) / 3; // heat[k-2] multiplied by 2
19951994
}
1995+
}
19961996

1997-
// Step 3. Randomly ignite new 'sparks' of heat near the bottom
1998-
if (random8() <= SEGMENT.intensity) {
1999-
uint8_t y = random8(ignition);
2000-
heat[y] = qadd8(heat[y], random8(160,255));
2001-
}
1997+
// Step 3. Randomly ignite new 'sparks' of heat near the bottom
1998+
if (random8() <= SEGMENT.intensity) {
1999+
uint8_t y = random8(ignition);
2000+
uint8_t boost = (32+SEGMENT.custom3*2) * (2*ignition-y) / (2*ignition);
2001+
heat[y] = qadd8(heat[y], random8(64+boost,128+boost));
20022002
}
20032003

20042004
// Step 4. Map from heat cells to LED colors
@@ -2011,12 +2011,14 @@ uint16_t mode_fire_2012() {
20112011
for (int stripNr=0; stripNr<strips; stripNr++)
20122012
virtualStrip::runStrip(stripNr, &heat[stripNr * SEGLEN], it);
20132013

2014+
if (SEGMENT.is2D()) SEGMENT.blur(32);
2015+
20142016
if (it != SEGENV.step)
20152017
SEGENV.step = it;
20162018

20172019
return FRAMETIME;
20182020
}
2019-
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
2021+
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
20202022

20212023

20222024
// ColorWavesWithPalettes by Mark Kriegsman: https://gist.github.com/kriegsman/8281905786e8b2632aeb

wled00/improv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void sendImprovInfoResponse() {
189189
out[11] = 4; //Firmware len ("WLED")
190190
out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D';
191191
uint8_t lengthSum = 17;
192-
uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b1.16/%i"),VERSION);
192+
uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b7.17/%i"),VERSION);
193193
out[16] = vlen; lengthSum += vlen;
194194
uint8_t hlen = 7;
195195
#ifdef ESP8266

wled00/wled.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
Main sketch, global variable declarations
55
@title WLED project sketch
6-
@version 0.14.0-b1
6+
@version 0.14.0-b2
77
@author Christian Schwinne
88
*/
99

0 commit comments

Comments
 (0)