Skip to content

Commit 5163fbf

Browse files
committed
Merge branch 'main' into usermod-libs-matrix
2 parents b187f94 + d2d5c42 commit 5163fbf

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.github/workflows/pr-merge.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
with:
2929
ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check
3030
- name: Send Discord notification
31-
shell: bash
32-
env:
33-
DISCORD_WEBHOOK_BETA_TESTERS: ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}
3431
# if: github.event.pull_request.merged == true
3532
run: |
36-
curl -H "Content-Type: application/json" -d '{"content": "Pull Request ${{ github.event.pull_request.number }} merged by ${{ github.actor }}"}' $DISCORD_WEBHOOK_BETA_TESTERS
33+
curl -H "Content-Type: application/json" -d '{"content": "Pull Request ${{ github.event.pull_request.number }} merged by ${{ github.actor }}"}' ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}

usermods/audioreactive/audio_reactive.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,14 @@ static bool udpSyncConnected = false; // UDP connection status -> true i
6565

6666
// audioreactive variables
6767
#ifdef ARDUINO_ARCH_ESP32
68+
#ifndef SR_AGC // Automatic gain control mode
69+
#define SR_AGC 0 // default mode = off
70+
#endif
6871
static float micDataReal = 0.0f; // MicIn data with full 24bit resolution - lowest 8bit after decimal point
6972
static float multAgc = 1.0f; // sample * multAgc = sampleAgc. Our AGC multiplier
7073
static float sampleAvg = 0.0f; // Smoothed Average sample - sampleAvg < 1 means "quiet" (simple noise gate)
7174
static float sampleAgc = 0.0f; // Smoothed AGC sample
72-
static uint8_t soundAgc = 0; // Automagic gain control: 0 - none, 1 - normal, 2 - vivid, 3 - lazy (config value)
75+
static uint8_t soundAgc = SR_AGC; // Automatic gain control: 0 - off, 1 - normal, 2 - vivid, 3 - lazy (config value)
7376
#endif
7477
//static float volumeSmth = 0.0f; // either sampleAvg or sampleAgc depending on soundAgc; smoothed sample
7578
static float FFT_MajorPeak = 1.0f; // FFT: strongest (peak) frequency

usermods/audioreactive/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ You can use the following additional flags in your `build_flags`
6060

6161
* `-D SR_SQUELCH=x` : Default "squelch" setting (10)
6262
* `-D SR_GAIN=x` : Default "gain" setting (60)
63+
* `-D SR_AGC=x` : (Only ESP32) Default "AGC (Automatic Gain Control)" setting (0): 0=off, 1=normal, 2=vivid, 3=lazy
6364
* `-D I2S_USE_RIGHT_CHANNEL`: Use RIGHT instead of LEFT channel (not recommended unless you strictly need this).
64-
* `-D I2S_USE_16BIT_SAMPLES`: Use 16bit instead of 32bit for internal sample buffers. Reduces sampling quality, but frees some RAM ressources (not recommended unless you absolutely need this).
65+
* `-D I2S_USE_16BIT_SAMPLES`: Use 16bit instead of 32bit for internal sample buffers. Reduces sampling quality, but frees some RAM resources (not recommended unless you absolutely need this).
6566
* `-D I2S_GRAB_ADC1_COMPLETELY`: Experimental: continuously sample analog ADC microphone. Only effective on ESP32. WARNING this *will* cause conflicts(lock-up) with any analogRead() call.
6667
* `-D MIC_LOGGER` : (debugging) Logs samples from the microphone to serial USB. Use with serial plotter (Arduino IDE)
6768
* `-D SR_DEBUG` : (debugging) Additional error diagnostics and debug info on serial USB.

wled00/FX.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4818,24 +4818,24 @@ static const char _data_FX_MODE_WAVESINS[] PROGMEM = "Wavesins@!,Brightness vari
48184818
//////////////////////////////
48194819
// Flow Stripe //
48204820
//////////////////////////////
4821-
// By: ldirko https://editor.soulmatelights.com/gallery/392-flow-led-stripe , modifed by: Andrew Tuline
4821+
// By: ldirko https://editor.soulmatelights.com/gallery/392-flow-led-stripe , modifed by: Andrew Tuline, fixed by @DedeHai
48224822
uint16_t mode_FlowStripe(void) {
48234823
if (SEGLEN <= 1) return mode_static();
48244824
const int hl = SEGLEN * 10 / 13;
48254825
uint8_t hue = strip.now / (SEGMENT.speed+1);
48264826
uint32_t t = strip.now / (SEGMENT.intensity/8+1);
48274827

48284828
for (unsigned i = 0; i < SEGLEN; i++) {
4829-
int c = (abs((int)i - hl) / hl) * 127;
4829+
int c = ((abs((int)i - hl) * 127) / hl);
48304830
c = sin8_t(c);
48314831
c = sin8_t(c / 2 + t);
48324832
byte b = sin8_t(c + t/8);
4833-
SEGMENT.setPixelColor(i, CHSV(b + hue, 255, 255));
4833+
SEGMENT.setPixelColor(i, SEGMENT.color_from_palette(b + hue, false, true, 3));
48344834
}
48354835

48364836
return FRAMETIME;
48374837
} // mode_FlowStripe()
4838-
static const char _data_FX_MODE_FLOWSTRIPE[] PROGMEM = "Flow Stripe@Hue speed,Effect speed;;";
4838+
static const char _data_FX_MODE_FLOWSTRIPE[] PROGMEM = "Flow Stripe@Hue speed,Effect speed;;!;pal=11";
48394839

48404840

48414841
#ifndef WLED_DISABLE_2D

wled00/data/settings_leds.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@
353353
});
354354
const S2 = (oMaxB == 14) && (maxV == 4);
355355
const S3 = (oMaxB == 14) && (maxV == 6);
356-
if (oMaxB == 19 || S2 || S3) { // TODO: crude ESP32 & S2/S3 detection
356+
if (oMaxB == 32 || S2 || S3) { // TODO: crude ESP32 & S2/S3 detection
357357
if (maxLC > 300 || dC <= 2) {
358358
d.Sf["PR"].checked = false;
359359
gId("prl").classList.add("hide");

0 commit comments

Comments
 (0)