-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add new effects: music strobe and flame jet #4819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
277c222
5f29ce2
70e06db
e7b1ec0
9ee7e4e
d2874e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| # ------------------------------------------------------------------------------ | ||
|
|
||
| # CI/release binaries | ||
| default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover, usermods | ||
| default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32dev_V4, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover, usermods | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Veto ;-) to any changes in platformio.ini. The modification to platformio.ini is not related to the scope of the PR. Please remove unrelated changes. |
||
|
|
||
| src_dir = ./wled00 | ||
| data_dir = ./wled00/data | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10644,6 +10644,118 @@ uint8_t WS2812FX::addEffect(uint8_t id, mode_ptr mode_fn, const char *mode_name) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Simple bit strobe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t mode_music_strobe(void) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| um_data_t *um_data = getAudioData(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!um_data) return FRAMETIME; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bool samplePeak = *(bool*)um_data->u_data[3]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int volumeRaw = *(int16_t*)um_data->u_data[1]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10654
to
+10655
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Avoid raw pointer casts for audio flags.
🤖 Prompt for AI Agents
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. um_data is not strongly typed as different usermods can send different data. Sadly we can't return a strongly typed result from getAudioData as the AudioReactive usermod might not be included in the build and so dummy data is returned for effects that expect audio
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @netmindz Thanks for the context. Agreed — since um_data is intentionally untyped (and can be simulated), we can’t introduce a strongly typed accessor. Small, safe tweak we can still do to avoid aliasing through a bool pointer: read the documented byte and then convert to bool. That keeps the loose typing but eliminates potential alignment/aliasing pitfalls and matches the mapping comment in FX.cpp (samplePeak is uint8_t at u_data[3]). Example minimal change in the new effects: // before
bool samplePeak = *(bool*)um_data->u_data[3];
// after (safer and aligned with documented mapping)
bool samplePeak = (*(uint8_t*)um_data->u_data[3]) != 0;Optionally, we can centralize this in tiny helpers near getAudioData() to keep casts in one place (still generic, no strong typing): static inline bool ar_samplePeak(const um_data_t* d) {
return (*(uint8_t*)d->u_data[3]) != 0;
}
static inline int16_t ar_volumeRaw(const um_data_t* d) {
return *(int16_t*)d->u_data[1];
}
// usage
bool samplePeak = ar_samplePeak(um_data);
int volumeRaw = ar_volumeRaw(um_data);If you’re OK with it, I’ll suggest the minimal bool change across mode_music_strobe and mode_flame_jet to stay consistent with the file’s mapping. ✏️ Learnings added
🧠 Learnings used
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. those helper methods would certainly help code readability, but it does mean adding ar_ functions into the main codebase that relate to a usermod, so you might as well at that stage add strongly typed return of getAudioData as both is adding AR specific code into the general codebase
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @netmindz Totally fair. Let’s keep core clean and avoid AR-specific helpers. I’ll switch the samplePeak read to the safer inline form (aligned with the documented mapping) and leave everything else as-is: // mode_music_strobe
um_data_t *um_data = getAudioData();
if (!um_data) return FRAMETIME;
bool samplePeak = (*(uint8_t*)um_data->u_data[3]) != 0;
int volumeRaw = *(int16_t*)um_data->u_data[1];// mode_flame_jet
um_data_t *um_data = getAudioData();
if (!um_data) return FRAMETIME;
bool samplePeak = (*(uint8_t*)um_data->u_data[3]) != 0;
int volumeRaw = *(int16_t*)um_data->u_data[1];This avoids aliasing through a bool pointer, preserves the untyped contract of um_data, and doesn’t introduce any AR-specific helpers into the codebase. ✏️ Learnings added
🧠 Learnings used |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| long mappedSpeed = map(SEGMENT.speed, 0, 255, 0, 20); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint8_t fadeBy = 255 - mappedSpeed; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGMENT.fade_out(fadeBy); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint8_t threshold = SEGMENT.intensity; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (samplePeak && volumeRaw > threshold) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGMENT.fill(SEGCOLOR(0)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return FRAMETIME; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const char _data_FX_MODE_MUSIC_STROBE[] PROGMEM = "Music Strobe@Fade speed,Threshold;!,!;!;1v;ix=128,sx=224,si=1"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please verify if the metadata string is correct. I think that "1v" is for |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Flame jet | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t mode_flame_jet(void) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| um_data_t *um_data = getAudioData(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!um_data) return FRAMETIME; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bool samplePeak = *(bool*)um_data->u_data[3]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int volumeRaw = *(int16_t*)um_data->u_data[1]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| long mappedFade = map(SEGMENT.intensity, 0, 255, 0, 64); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint8_t fade_by = 255 - mappedFade; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGMENT.fade_out(fade_by); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint8_t threshold = SEGMENT.custom1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (samplePeak && volumeRaw > threshold && SEGENV.aux0 == 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGENV.aux0 = 1; // start animation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // --- Animation --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (SEGENV.aux0 > 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| long mappedSpeed = map(SEGMENT.speed, 0, 255, 0, 32); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t rise_amount = 1 + (uint16_t)(volumeRaw * (1 + (uint16_t)mappedSpeed)) / 2000; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (SEGMENT.is2D()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // --- 2D LOGIC --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const uint16_t max_height = SEG_H; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t start_y = SEG_H - 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (uint16_t y_offset = 0; y_offset < SEGENV.aux0; y_offset++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t current_y = start_y - y_offset; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (current_y >= SEG_H) continue; // Boundary check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10702
to
+10705
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Potential unsigned underflow when When if (y_offset > start_y) break; // prevents under-flow🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint32_t base_color = SEGCOLOR(0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CRGB fastled_color = CRGB(base_color); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint8_t heat_reduction = map(y_offset, 0, SEG_H, 0, 180); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fastled_color.g = qsub8(fastled_color.g, heat_reduction); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fastled_color.b = qsub8(fastled_color.b, heat_reduction * 2); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens when one of the color channels is less than |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (uint16_t x = 0; x < SEG_W; x++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CRGB final_color = fastled_color; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (hw_random8() < 50) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final_color.nscale8(220); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGMENT.setPixelColorXY(x, current_y, final_color); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGENV.aux0 += rise_amount; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (SEGENV.aux0 >= max_height) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGENV.aux0 = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // --- 1D LOGIC --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const uint16_t max_height = SEGLEN; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t start_index = 0; // Or SEGLEN - 1 if you want it from the other end | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (uint16_t i_offset = 0; i_offset < SEGENV.aux0; i_offset++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint16_t current_index = start_index + i_offset; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (current_index >= SEGLEN) continue; // Boundary check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better to use |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint32_t base_color = SEGCOLOR(0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CRGB fastled_color = CRGB(base_color); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint8_t heat_reduction = map(i_offset, 0, SEGLEN, 0, 180); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fastled_color.g = qsub8(fastled_color.g, heat_reduction); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fastled_color.b = qsub8(fastled_color.b, heat_reduction * 2); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question as for the 2D case - how is qsub8 handling results <0 ? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (hw_random8() < 50) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fastled_color.nscale8(220); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGMENT.setPixelColor(current_index, fastled_color); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10731
to
+10746
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Break early when 1D index passes SEGLEN; honor segment direction.
- const uint16_t max_height = SEGLEN;
- uint16_t start_index = 0; // Or SEGLEN - 1 if you want it from the other end
+ const uint16_t max_height = SEGLEN;
+ const bool rev = SEGMENT.reverse;
+ uint16_t start_index = rev ? (SEGLEN - 1) : 0;
- for (uint16_t i_offset = 0; i_offset < SEGENV.aux0; i_offset++) {
- uint16_t current_index = start_index + i_offset;
- if (current_index >= SEGLEN) continue; // Boundary check
+ for (uint16_t i_offset = 0; i_offset < SEGENV.aux0; i_offset++) {
+ uint16_t current_index = rev ? (start_index - i_offset) : (start_index + i_offset);
+ if (current_index >= SEGLEN) break; // Boundary check & early exit📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGENV.aux0 += rise_amount; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (SEGENV.aux0 >= max_height) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SEGENV.aux0 = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return FRAMETIME; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const char _data_FX_MODE_FLAME_JET[] PROGMEM = "Flame Jet@Base Speed,Trail Length,Threshold;!;!;1v;ix=192,sx=128,c1=128,pal=35,si=1"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here - please verify if the metadata is correct. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void WS2812FX::setupEffectData() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Solid must be first! (assuming vector is empty upon call to setup) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _mode.push_back(&mode_static); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -10778,6 +10890,7 @@ void WS2812FX::setupEffectData() { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_DYNAMIC_SMOOTH, &mode_dynamic_smooth, _data_FX_MODE_DYNAMIC_SMOOTH); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // --- 1D audio effects --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_MUSIC_STROBE, &mode_music_strobe, _data_FX_MODE_MUSIC_STROBE); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_PIXELS, &mode_pixels, _data_FX_MODE_PIXELS); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_PIXELWAVE, &mode_pixelwave, _data_FX_MODE_PIXELWAVE); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_JUGGLES, &mode_juggles, _data_FX_MODE_JUGGLES); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -10851,6 +10964,7 @@ void WS2812FX::setupEffectData() { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_2DOCTOPUS, &mode_2Doctopus, _data_FX_MODE_2DOCTOPUS); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_2DWAVINGCELL, &mode_2Dwavingcell, _data_FX_MODE_2DWAVINGCELL); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_2DAKEMI, &mode_2DAkemi, _data_FX_MODE_2DAKEMI); // audio | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_FLAME_JET, &mode_flame_jet, _data_FX_MODE_FLAME_JET); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #ifndef WLED_DISABLE_PARTICLESYSTEM2D | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addEffect(FX_MODE_PARTICLEVOLCANO, &mode_particlevolcano, _data_FX_MODE_PARTICLEVOLCANO); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Undefined environment in default_envs: esp32dev_V4
"default_envs" includes "esp32dev_V4", but there is no corresponding [env:esp32dev_V4] defined in this file. This will cause PlatformIO to fail when building CI/release binaries. The existing [env:esp32dev] already targets the V4 toolchain (esp32_idf_V4), so "esp32dev_V4" looks like a mistaken/duplicate entry.
Apply this diff to fix:
Run to confirm there is no such env:
🏁 Script executed:
Length of output: 186
Remove undefined “esp32dev_V4” from default_envs
Confirmed there is no
[env:esp32dev_V4]defined in platformio.ini, so including it indefault_envswill break CI/builds.Attention:
default_envslistApply this diff:
🤖 Prompt for AI Agents