Fixes. Auto is too animated.

This commit is contained in:
Troy
2024-03-23 09:29:32 -04:00
parent fd714e3e0f
commit 734ba39399
2 changed files with 4 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
#endif
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// this applies "pink noise scaling" to FFT results before computing the major peak for effects.
// this applies "pink noise scaling" to FFT results before computing the major peak for effects.0
// currently only for ESP32-S3 and classic ESP32, due to increased runtime
#define FFT_MAJORPEAK_HUMAN_EAR
#endif
@@ -549,6 +549,7 @@ void FFTcode(void * parameter)
// find highest sample in the batch
float maxSample = 0.0f; // max sample from FFT batch
zeroCrossingCount = 0;
for (int i=0; i < samplesFFT; i++) {
// set imaginary parts to 0
vImag[i] = 0;

View File

@@ -34,8 +34,8 @@ class AutoPlaylistUsermod : public Usermod {
int change_threshold = 10;
int change_lockout = 100; // never change below this numnber of millis. I think of this more like a debounce, but opinions may vary.
int ideal_change_max = 5000; // ideally change patterns no more than this number of millis
int ideal_change_min = 2000; // ideally change patterns no less than this number of millis
int ideal_change_max = 5000; // ideally change patterns no more than this number of millis
std::vector<int> autoChangeIds;
@@ -65,7 +65,7 @@ class AutoPlaylistUsermod : public Usermod {
unsigned int zcr = extra[0];
int energy = extra[1];
int lfc = getFFTFromRange(um_data, 0 , 3);
int lfc = extra[2]; // getFFTFromRange(um_data, 1 , 3);
// WLED-MM/TroyHacks: Calculate the long- and short-running averages
// and the squared_distance for the vector.