Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/0_15' into FXparticleSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
DedeHai committed May 5, 2024
2 parents 0b45f66 + 3f9a6ca commit ba337ab
Show file tree
Hide file tree
Showing 12 changed files with 375 additions and 360 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## WLED changelog

#### Build 240503
- Using brightness in analog clock overlay (#3944 by @paspiz85)
- Add Webpage shortcuts (#3945 by @w00000dy)
- ArtNet Poll reply (#3892 by @askask)
- Improved brightness change via long button presses (#3933 by @gaaat98)
- Relay open drain output (#3920 by @Suxsem)
- NEW JSON API: release info (update page, `info.release`)
- update esp32 platform to arduino-esp32 v2.0.9 (#3902)
- various optimisations and bugfixes (#3952, #3922, #3878, #3926, #3919, #3904 @DedeHai)

#### Build 2404120
- v0.15.0-b3
- fix for #3896 & WS2815 current saving
Expand Down
9 changes: 7 additions & 2 deletions usermods/audioreactive/audio_reactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ constexpr uint16_t samplesFFT_2 = 256; // meaningfull part of FFT resul
// These are the input and output vectors. Input vectors receive computed results from FFT.
static float vReal[samplesFFT] = {0.0f}; // FFT sample inputs / freq output - these are our raw result bins
static float vImag[samplesFFT] = {0.0f}; // imaginary parts
static float windowWeighingFactors[samplesFFT] = {0.0f};

// Create FFT object
// lib_deps += https://github.com/kosme/arduinoFFT#develop @ 1.9.2
Expand All @@ -196,7 +195,8 @@ static float windowWeighingFactors[samplesFFT] = {0.0f};

#include <arduinoFFT.h>

static ArduinoFFT<float> FFT = ArduinoFFT<float>( vReal, vImag, samplesFFT, SAMPLE_RATE, windowWeighingFactors);
/* Create FFT object with weighing factor storage */
static ArduinoFFT<float> FFT = ArduinoFFT<float>( vReal, vImag, samplesFFT, SAMPLE_RATE, true);

// Helper functions

Expand Down Expand Up @@ -1121,6 +1121,11 @@ class AudioReactive : public Usermod {
delay(100); // Give that poor microphone some time to setup.

useBandPassFilter = false;

#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
if ((i2sckPin == I2S_PIN_NO_CHANGE) && (i2ssdPin >= 0) && (i2swsPin >= 0) && ((dmType == 1) || (dmType == 4)) ) dmType = 5; // dummy user support: SCK == -1 --means--> PDM microphone
#endif

switch (dmType) {
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
// stub cases for not-yet-supported I2S modes on other ESP32 chips
Expand Down
21 changes: 18 additions & 3 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ function onLoad()

selectSlot(0);
updateTablinks(0);
handleLocationHash();
cpick.on("input:end", () => {setColor(1);});
cpick.on("color:change", () => {updatePSliders()});
pmtLS = localStorage.getItem('wledPmt');
Expand Down Expand Up @@ -304,7 +305,6 @@ function updateTablinks(tabI)
{
var tablinks = gEBCN("tablinks");
for (var i of tablinks) i.classList.remove('active');
if (pcMode) return;
tablinks[tabI].classList.add('active');
}

Expand All @@ -315,6 +315,21 @@ function openTab(tabI, force = false)
_C.classList.toggle('smooth', false);
_C.style.setProperty('--i', iSlide);
updateTablinks(tabI);
switch (tabI) {
case 0: window.location.hash = "Colors"; break;
case 1: window.location.hash = "Effects"; break;
case 2: window.location.hash = "Segments"; break;
case 3: window.location.hash = "Presets"; break;
}
}

function handleLocationHash() {
switch (window.location.hash) {
case "#Colors": openTab(0); break;
case "#Effects": openTab(1); break;
case "#Segments": openTab(2); break;
case "#Presets": openTab(3); break;
}
}

var timeout;
Expand Down Expand Up @@ -3051,8 +3066,7 @@ function togglePcMode(fromB = false)
pcMode = (wW >= 1024) && pcModeA;
if (cpick) cpick.resize(pcMode && wW>1023 && wW<1250 ? 230 : 260); // for tablet in landscape
if (!fromB && ((wW < 1024 && lastw < 1024) || (wW >= 1024 && lastw >= 1024))) return; // no change in size and called from size()
openTab(0, true);
updateTablinks(0);
if (pcMode) openTab(0, true);
gId('buttonPcm').className = (pcMode) ? "active":"";
gId('bot').style.height = (pcMode && !cfg.comp.pcmbot) ? "0":"auto";
sCol('--bh', gId('bot').clientHeight + "px");
Expand Down Expand Up @@ -3214,6 +3228,7 @@ size();
_C.style.setProperty('--n', N);

window.addEventListener('resize', size, true);
window.addEventListener('hashchange', handleLocationHash);

_C.addEventListener('mousedown', lock, false);
_C.addEventListener('touchstart', lock, false);
Expand Down
14 changes: 1 addition & 13 deletions wled00/fcn_declare.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,8 @@ void handleImprovWifiScan();
void sendImprovIPRPCResult(ImprovRPCType type);

//ir.cpp
void applyRepeatActions();
byte relativeChange(byte property, int8_t amount, byte lowerBoundary = 0, byte higherBoundary = 0xFF);
void decodeIR(uint32_t code);
void decodeIR24(uint32_t code);
void decodeIR24OLD(uint32_t code);
void decodeIR24CT(uint32_t code);
void decodeIR40(uint32_t code);
void decodeIR44(uint32_t code);
void decodeIR21(uint32_t code);
void decodeIR6(uint32_t code);
void decodeIR9(uint32_t code);
void decodeIRJson(uint32_t code);

void initIR();
void deInitIR();
void handleIR();

//json.cpp
Expand Down
Loading

0 comments on commit ba337ab

Please sign in to comment.