From 72168d28b112b1211792b0629c0bf7b7c3d9d84e Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 18 Jan 2023 23:09:37 +0100 Subject: [PATCH] new build flag SR_ENABLE_DEFAULT for boards with builtin microphone (like PICO) --- platformio.ini | 1 + usermods/audioreactive/audio_reactive.h | 4 ++++ wled00/wled.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index fae506eb..fe947fd2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1253,6 +1253,7 @@ build_flags = ${esp32_4MB_max_base.build_flags} -D SR_DMTYPE=1 -D I2S_SDPIN=25 -D I2S_WSPIN=15 -D I2S_CKPIN=14 -D SR_SQUELCH=5 -D SR_GAIN=30 -D SR_FREQ_PROF=5 ; ICS-43434 specific ; -D MCLK_PIN=0 + -D SR_ENABLE_DEFAULT ;; enable at first start - no need to manually set "enable", then reboot ; -D WLED_USE_MY_CONFIG ; -D WLED_DISABLE_LOXONE ; -D WLED_DISABLE_ALEXA diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index 51e08840..02e5c242 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -820,7 +820,11 @@ class AudioReactive : public Usermod { }; // set your config variables to their boot default value (this can also be done in readFromConfig() or a constructor if you prefer) + #ifdef SR_ENABLE_DEFAULT + bool enabled = true; // WLEDMM + #else bool enabled = false; + #endif bool initDone = false; // variables for UDP sound sync diff --git a/wled00/wled.h b/wled00/wled.h index 405af084..4d274d47 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2301170 +#define VERSION 2301180 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG