re-enable old peak detect algo, plus ripplepeak bugfix

* re-enabled old detector which does not detect beats. However something bad may still be better than nothing...

* fixed a typo in RipplePeak and Waterfall effect, which cased wrong configuration of the peak detector.

resolves https://github.com/MoonModules/WLED/issues/43
This commit is contained in:
Frank
2023-06-18 21:55:51 +02:00
parent b3677bd9b9
commit e0cb636706
2 changed files with 12 additions and 11 deletions

View File

@@ -6056,8 +6056,8 @@ uint16_t mode_ripplepeak(void) { // * Ripple peak. By Andrew Tuli
SEGMENT.custom1 = *binNum;
SEGMENT.custom2 = *maxVol * 2;
}
if (SEGMENT.custom1 < 2) SEGMENT.custom1 = 2; // WLEDMM prevent stupid settings
if (SEGMENT.custom2 < 48) SEGMENT.custom1 = 48; // WLEDMM prevent stupid settings
if (SEGMENT.custom1 < 1) SEGMENT.custom1 = 1; // WLEDMM prevent stupid settings for bin
if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings for maxVol (below 24 = noise)
*binNum = SEGMENT.custom1; // Select a bin.
*maxVol = SEGMENT.custom2 / 2; // Our volume comparator.
@@ -6677,8 +6677,8 @@ uint16_t mode_puddlepeak(void) { // Puddlepeak. By Andrew Tuline.
SEGMENT.custom1 = *binNum;
SEGMENT.custom2 = *maxVol * 2;
}
if (SEGMENT.custom1 < 2) SEGMENT.custom1 = 2; // WLEDMM prevent stupid settings
if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings
if (SEGMENT.custom1 < 1) SEGMENT.custom1 = 1; // WLEDMM prevent stupid settings for bin
if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings for maxVol (below 24 = noise)
*binNum = SEGMENT.custom1; // Select a bin.
*maxVol = SEGMENT.custom2 / 2; // Our volume comparator.
@@ -7281,8 +7281,8 @@ uint16_t mode_waterfall(void) { // Waterfall. By: Andrew Tulin
SEGMENT.custom2 = *maxVol * 2;
}
if (SEGMENT.custom1 < 2) SEGMENT.custom1 = 2; // WLEDMM prevent stupid settings
if (SEGMENT.custom2 < 48) SEGMENT.custom1 = 48; // WLEDMM prevent stupid settings
if (SEGMENT.custom1 < 1) SEGMENT.custom1 = 1; // WLEDMM prevent stupid settings for bin
if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings for maxVol (below 24 = noise)
*binNum = SEGMENT.custom1; // Select a bin.
*maxVol = SEGMENT.custom2 / 2; // Our volume comparator.