Merge branch 'mdev' of https://github.com/Brandon502/WLED into mdev
This commit is contained in:
@@ -139,7 +139,7 @@ def bin_rename_copy(source, target, env):
|
||||
shutil.copy(source_map, map_file)
|
||||
|
||||
# wledmm_print_all_defines(env)
|
||||
wledmm_print_build_info(env)
|
||||
# wledmm_print_build_info(env)
|
||||
|
||||
def bin_gzip(source, target, env):
|
||||
_create_dirs()
|
||||
|
||||
@@ -2476,11 +2476,16 @@ lib_ignore =
|
||||
|
||||
|
||||
[env:adafruit_matrixportal_esp32s3]
|
||||
; ESP32-S3 processor, 8 MB flash, 2 MB of PSRAM, dedicated driver pins for HUB75
|
||||
extends = esp32_4MB_V4_M_base
|
||||
platform = ${esp32.platformV4_xp} ;; 6.5.0 = first platform release supporting matrixportal
|
||||
platform_packages = ${esp32.platformV4_packages_xp} ;; arduino-esp32 2.0.14 needed - previous versions were missing files for matrixportal
|
||||
board = adafruit_matrixportal_esp32s3
|
||||
|
||||
board_build.partitions = ${esp32.large_partitions}
|
||||
board_build.f_flash = 80000000L
|
||||
board_build.flash_mode = qio
|
||||
|
||||
build_unflags = ${env:esp32S3_8MB_M.build_unflags} ;; use the same as "normal" S3 buildenv
|
||||
build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-indentation -Wno-format-truncation
|
||||
${common_mm.build_flags_S}
|
||||
|
||||
@@ -3696,6 +3696,7 @@ uint16_t mode_drip(void)
|
||||
if (!SEGENV.allocateData(dataSize * strips)) return mode_static(); //allocation failed
|
||||
Spark* drops = reinterpret_cast<Spark*>(SEGENV.data);
|
||||
|
||||
if (SEGENV.call == 0) SEGMENT.fill(BLACK); // WLEDMM clear LEDs at startup
|
||||
if (!SEGMENT.check2) SEGMENT.fill(SEGCOLOR(1));
|
||||
|
||||
struct virtualStrip {
|
||||
@@ -3703,9 +3704,9 @@ uint16_t mode_drip(void)
|
||||
|
||||
uint8_t numDrops = 1 + (SEGMENT.intensity >> 6); // 255>>6 = 3
|
||||
|
||||
float gravity = -0.0005 - (SEGMENT.speed/25000.0); //increased gravity (50000 to 25000)
|
||||
gravity *= max(1, SEGLEN-1);
|
||||
int sourcedrop = 12;
|
||||
float gravity = -0.0005f - (float(SEGMENT.speed)/35000.0f); //increased gravity (50000 to 35000)
|
||||
gravity *= min(max(1, SEGLEN-1), 255); //WLEDMM speed limit 255
|
||||
const int sourcedrop = 12;
|
||||
|
||||
for (int j=0;j<numDrops;j++) {
|
||||
if (drops[j].colIndex == 0) { //init
|
||||
@@ -3724,24 +3725,26 @@ uint16_t mode_drip(void)
|
||||
|
||||
drops[j].col += map(SEGMENT.custom1, 0, 255, 1, 6); // swelling
|
||||
|
||||
if (random16() <= drops[j].col * SEGMENT.custom1 * SEGMENT.custom1 / 10 / 128) { // random drop
|
||||
uint32_t fallrate = (drops[j].col * (1 + SEGMENT.custom1 * SEGMENT.custom1)) / 192; // WLEDMM specific
|
||||
if (random16() <= (fallrate / 10)) { // random drop => 1% ... 20% probalibity
|
||||
drops[j].colIndex=2; //fall
|
||||
drops[j].col=255;
|
||||
}
|
||||
}
|
||||
if (drops[j].colIndex > 1) { // falling
|
||||
if (drops[j].pos > 0) { // fall until end of segment
|
||||
if (drops[j].pos > 0.01f) { // fall until end of segment
|
||||
drops[j].pos += drops[j].vel;
|
||||
if (drops[j].pos < 0) drops[j].pos = 0;
|
||||
drops[j].vel += gravity; // gravity is negative
|
||||
|
||||
for (int i=1;i<7-drops[j].colIndex;i++) { // some minor math so we don't expand bouncing droplets
|
||||
uint16_t pos = constrain(uint16_t(drops[j].pos) +i, 0, SEGLEN-1); //this is BAD, returns a pos >= SEGLEN occasionally
|
||||
int intPos = roundf(drops[j].pos) +i; // WLEDMM round it first
|
||||
uint16_t pos = constrain(intPos, 0, SEGLEN-1); //this is BAD, returns a pos >= SEGLEN occasionally // WLEDMM bad cast to uint16_t removed
|
||||
SEGMENT.setPixelColor(indexToVStrip(pos, stripNr), color_blend(BLACK,dropColor,drops[j].col/i)); //spread pixel with fade while falling
|
||||
}
|
||||
|
||||
if (drops[j].colIndex > 2) { // during bounce, some water is on the floor
|
||||
SEGMENT.setPixelColor(indexToVStrip(0, stripNr), color_blend(dropColor,BLACK,drops[j].col));
|
||||
SEGMENT.setPixelColor(indexToVStrip(0, stripNr), color_blend(dropColor,BLACK, (2 * drops[j].col)/3)); // WLEDMM reduced brightness
|
||||
}
|
||||
} else { // we hit bottom
|
||||
if (drops[j].colIndex > 2) { // already hit once, so back to forming
|
||||
@@ -3768,7 +3771,7 @@ uint16_t mode_drip(void)
|
||||
|
||||
return FRAMETIME;
|
||||
}
|
||||
static const char _data_FX_MODE_DRIP[] PROGMEM = "Drip@Gravity,# of drips,,,,,Overlay;!,!;!;1.5d;m12=1"; //bar WLEDMM 1.5d
|
||||
static const char _data_FX_MODE_DRIP[] PROGMEM = "Drip@Gravity,# of drips,Fall ratio,,,,Overlay;!,!;!;1.5d;c1=127,m12=1"; //bar WLEDMM 1.5d
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2405240
|
||||
#define VERSION 2405241
|
||||
|
||||
// WLEDMM - you can check for this define in usermods, to only enabled WLEDMM specific code in the "right" fork. Its not defined in AC WLED.
|
||||
#define _MoonModules_WLED_
|
||||
|
||||
Reference in New Issue
Block a user