Commit Graph

190 Commits

Author SHA1 Message Date
Frank
559716867a minor rewording
seems that nobody understands what "GPIO config" means 😜 maybe "pin settings" is clearer.
2023-03-12 14:59:50 +01:00
Ewoud
bb6662ee35 NetDebug: switch between serial/netdebug, store ip and port in settings
pio.ini: enable WLED_DEBUG_HOST in esp32_4MB_M_debug and esp32_16MB_M_debug

audio_reactive, um6050, wled.h
- replace DEBUGOUT.print(x) by DEBUGOUT(x) etc

wled.h: switch between serial/netdebug

cfg.cpp, set.cpp, wled.cpp, xml.cpp
- store netDebugPrintIP and netDebugPrintPort in cfg.json

index.js: rename info tab on off to Net Debug

settings.sync: add netdebug

net_debug.h/cpp: use global netDebugPrintIP remove debugPrintHostIP
2023-02-24 15:40:16 +01:00
Ewoud
6437cc8c7e 4ld and ar um: default pins -1, if set, show in pin dropdown
Audio reactive usermod: add pio.ini build flags defaults (⎌) for mclk, sda and scl (if set)

4ld usermod: 
- if pio.ini build flags not set, make them -1 (undefined is even better but then problems with allocate pins, to be done later)
- pio.ini build flags defaults (⎌) different if spi (clockspi and mosispi instead of scl and sda)
- add pio.ini build flags defaults (⎌) for SPI CS, DC and RESET
2023-01-27 11:09:08 +01:00
Ewoud
15d753aa4a Show analog pins in pin dropdown and show only if analog signal
- shorten oappend MM function names
- add aOpt: analog options only
- add pin 17 for esp8266 (analog pin)
- add a.pins array to show analog pins in pin dropdown
2023-01-23 20:44:12 +01:00
Frank
b27f70f423 AR: small fix for debug statistics
"smooting" does nor work in integer. we need float.
2023-01-19 17:45:16 +01:00
Frank
72168d28b1 new build flag SR_ENABLE_DEFAULT
for boards with builtin microphone (like PICO)
2023-01-18 23:09:37 +01:00
Frank
5575d6ab11 audioreactive optimization for -C3
some optimizations for -C3.

* skip every second FFT, and use interpolation instead.
* reduce sampling rate from 22Khz to 18Khz
* new debug measurement for I2S cycle times (FFTTask)

--> in total, this brings CPU load for sound processing down to 60% (from >100% previously)
2023-01-18 18:40:37 +01:00
Ewoud
10f006ef18 Small changes on pin dropdowns / usermod help
platformio.ini: add wemos_shield_esp32_4MB_all_base

usermods:
- rename disableROPins to disableRO
- bme280: add appendConfigData, info and disableRO
- PWM Fan: add appendConfigData

Settings_um.htm
- add 🟢
2023-01-16 15:07:41 +01:00
Ewoud
90c0870e74 pinDropDown: make reserved and read only aware and disable if needed
AudioReactive: add disableROPins on WS, SCK, MCLK and SCL
4LD:  add disableROPins  on CLK

settingsum: 
- addfield: max 49 pins, if (global interface) also disabled, rename if to global, show 🔴 if pin claimed
- add disableROPins
- pinDropdownsPost
- rename SDA to if:SDA (etc) so it is part of claimed pins (also in set.cpp and xml.cpp)

xml.cpp:
- appendGPIOinfo(): get rsvd and ro_gpio from pinManager.isPinOk instead of hardcoded
- getSettingsJS: add pinDropdownsPost
2023-01-14 17:30:43 +01:00
Ewoud
642d7d91ea i2c_sda, i2c_scl, spi_mosi, spi_miso, spi_sclk without HW_PIN_*, bh1750
platformio: 
- add bh1750 to _max
- define rotary defaults for wemos

usermod_bh1750
- Remove HW_PIN_* and replace by i2c_sda etc
- add appendConfigData

usermods mpu6050_imu, rtc, 4ld, pinmanager
- Remove HW_PIN_* 

change SDA2:pin (etc) to SDA:pin
2023-01-05 16:35:49 +01:00
Ewoud
23663a46f9 Refactor global pins settings using dropdowns and add to rotary_encoder
- replace rOption by  xOption (extend option) to show default value (⎌)
- Usermod rotary_encoder: add appendConfigData function and show help and default functions
- Settings.htm: Move Usermods(pins) below the usermods

Settings_um.htm
- remove SDAPin etc
- comment check(0,k) as not used anymore
- add xOption
- add generated global pin fields (using addField) in ldS
- remove hard coded global pin fields

set.cpp: set i2c_sda etc using new generated fields
xml.cpp: set generated fields values using i2c_sda etc and show defaults
2023-01-04 12:17:14 +01:00
Ewoud
9bc6451145 appendConfigData only for usermod + optimizations
- rename replaceOption to rOption
- rename removeOptions to dOptions
- set oAppend buffer size back to 3096
- WLEDMM warning on settings2D Populate
- add AppendConfig per usermod
- add request parameter to getSettinsJS
- add lookupName
2023-01-03 13:08:14 +01:00
Ewoud
86ceca5de7 Usermods: add removeOptions e.g. for pin MCLK
- add replaceOption to analogmic
- fix: right default for audio reactive scl
- pinmanager add case UM_Battery
2023-01-02 21:42:19 +01:00
Frank
a3c2f4a0ec fixing UDP sound sync startup problems
sometimes sound sync only worked after disable + enable audioreactive. This hopefully improves the situation.
2023-01-02 20:34:13 +01:00
Frank
d02bdb8a82 UDP sound sync improvement
improving the new auto-reconnect mode.
Only disconnect receiver on network change, or when idle after receiving something.
2023-01-02 20:06:54 +01:00
Frank
6716265469 audio core tuning, UDP sync stabilization
* FFT parameter tuning -> speedup  ~50% on ESP32
* UDP sound sync - try to reconnect if idle
2023-01-01 21:29:45 +01:00
Frank
ac898cb163 small improvement to MIC_LOGGER
make the serial plotter graphs easier to read:
* physical samples scaled down to 50%
* added 256 for all effect vars, so their graph will always be above the physical samples lines
2022-12-29 23:53:59 +01:00
Ewoud
5c161db062 Add dropdowns for pins (part 1 of 2)
Set for Audioreactive and 4linedisplay usermods

Prepare for globals (part2):
Rename SDA to SDApin etc
2022-12-23 17:21:35 +01:00
Frank
e6bd66d35d improve support for -S2
got myself an adafruit "qt py -S2" with tinyUF2 bootloader. So I wanted to get that working. And it does work :-).
FFT time = 10ms (instead of 2ms on classic ESP32)  is a very good result, also virtual USB runs much better now.
2022-12-22 23:22:58 +01:00
Frank
f9b9716fdd Improvements for -S2
- new partition table for boards with UF2 boot (Adafruit qt py S2)
- better treatment of debug out using "USBCDC" native port
- workarounds for watchdog crashes on -S2
- Add missing but mandatory build flags for -S2 and -C3
2022-12-21 17:25:41 +01:00
Ewoud
fb5c057f94 More usermod help 2022-12-21 13:16:55 +01:00
Ewoud
2af9fc3755 Add mm.kno.wled.ge
Change https://kno.wled.ge to https://mm.kno.wled.ge
Change help to ?  button in usermods
Change WeatherUserMod to Weather
2022-12-21 12:30:40 +01:00
Frank
95e6f471ce miclogger - added average signal (optional) 2022-12-19 18:29:22 +01:00
Ewoud
949373df91 Add usermod help links for AR, 4LD and weather
Other usermods: 

void appendConfigData()
{
... 
 oappend(SET_F("addInfo('<modname>:help',0,'<a href=\"https:// \">Help</a>');"));
   ...
}
2022-12-19 16:42:07 +01:00
Frank
465c032535 audio mic logger improvement
added min/max of raw samples to the plot.
This will help for debugging microphones with strong negative DC offset.
2022-12-19 16:29:49 +01:00
Frank
42cc302159 enable bandpass filter for analog input
Analog input seems to sometime have a very strong negative DC offset, when the signal is not centered at 1.8V. The bandpass filter should help to reenter such "off limits" signals.
See discussions in issue #10 .
2022-12-19 11:15:37 +01:00
Ewoud
ffe52fcbf5 Merge remote-tracking branch 'origin/ac_main' into mdev 2022-12-16 11:43:27 +01:00
srg74
8caeddde15 Spelling check by @wthomson (#2940)
A lot of spelling corrections. Now repo will sound like educated person :)

Co-authored-by: Bill Thomson <bt@kattt.org>
2022-12-10 16:12:55 +01:00
Ewoud
44b4ced6a3 Platformio defaults in settings: change default by ⎌ 2022-12-08 09:40:52 +01:00
Ewoud
5a97a6a448 Bugfix 2022-12-07 16:09:29 +01:00
Ewoud
84de8dd0a2 Add platformio defaults to 4ld and SR, add moon, add MM in about
const.h: increase SETTINGS_STACK_BUF_SIZE

audio_reactive, 4ld and usermod (xml.cpp)
- add defaults in settings

index.htm: add moon

settings_sec: add WLEDMM about

settings_um: add <br> so comment can be shown decently
2022-12-07 15:42:48 +01:00
Ewoud
3160a0b090 Merge remote-tracking branch 'origin/ac_main' into mdev 2022-12-06 14:38:49 +01:00
Frank
0c3adf1f8a pin info small improvements 2022-12-04 20:09:10 +01:00
Frank
676cc26171 use Serial.print for important info like wifi stuff
.. and for other important info.
Will be muted automatically in case that serial is in used for other purposes.
2022-12-04 17:52:10 +01:00
Ewoud
e799cb5bd1 CustomFX, platformIO and bin name: small updates
platformio: 
- remove ABL_MILLIAMPS_DEFAULT from build_flags_min, set default 1500 in const.h
- add default in wemos_shield_esp32_4MB_max_base
- add wemos_shield_esp32_16MB_SPM1423_max

arti_wled.h: bugfix use all leds in 2D
usermod_v2_customeffects.h: fill black if call==0

index.js and xml.cpp: bin name: replace one _ by ' ' to enable line wrap in info tab and ota update
2022-11-29 15:32:26 +01:00
Blaž Kristan
9f1a7a1c20 Swap info. 2022-11-29 15:02:56 +01:00
Frank
1f0b53ce7a prepare for merge with upstream
- prepare for merging upstream
--> audiorective files should stay the same after merging!
- makuna just release NeoPixelBus 2.7.1 -> use for "V4" build
2022-11-29 13:49:17 +01:00
Frank
98138a02e3 audioreactive usermod update (align with MoonMod code) (#2907)
* audioreactive driver update

- Better handling of PDM and I2S Line-in
- Bugfixes for ES7243 (allocateMultiplePins)
- More error messages for ES7243
- sample scaling (needed for sources that use full scale of samples)

* audiorective update

* align SR_DEBUG with WLED_DEBUG
* optional bandpass filter (needed for PDM mics)
* sample scaling for PDM and Line-In
* small improvements for analog input
* bugfixes and small performance improvements
* code for FFT task refactored, for better readablity. Introduces separate functions for filtering and post-processing
* small improvement for beat detection
* default mic settings can be configured at compile time
* correct mic type if MCU does not support PDM or ADC
* hide analog PIN config if not supported by MCU

* audioreactive updates

- minor updates to source code (see discussion in PR #2907)
- usermod readme improvements

* small readme update

* one think I overlooked

* ok, another edit. Now its final. Hopefully.

* small upps

wrong parameter order in debug message.
2022-11-28 20:52:33 +01:00
Ewoud
bf51b0bdf1 addInfo fix and simpler version numbering system
- addInfo: revert back to initial solution to fix mixing up pre and post
- new version: 0.14.0.7 (stop using 2 digits at the end
2022-11-28 20:34:42 +01:00
Ewoud
91c2ce0d8f Merge remote-tracking branch 'origin/ac_main' into mdev 2022-11-28 19:58:51 +01:00
Frank
4cedcf6ad8 PIO: fix platformV4_packages
It seems that "platformio/framework-arduinoespressif32@ ~3.20004.220825" was removed/renamed very recently.
2022-11-26 22:26:18 +01:00
Ewoud
78e9f5bd1a Clean up UserMod settings: grouping of variables and add preInfo to variables (#2894)
* Grouping um settings, add pre and post Info, update  SR & 4LD settings

Settings_um.htm: 
- modify addField (grouping)
- addInfo (pre and post texts)

Add preInfo to audio reactive and 4ld usermod

Extra:
platformio: wemos_shield: add audio reactive usermod and update to alt display

* um settings: cpp: lowercase, js: initcap

* um settings: txt only pre, txt2 only post and initCap as function

* Fix rotary encoder info string

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2022-11-26 03:44:04 +01:00
Frank
75b4c7e9e9 use WLED_DEBUG for important warnings
* make sure that important warnings are also shown when only WLED_DEBUG is set, but SR_DEBUG not set.
* some extra error messages for ES7243
2022-11-25 13:44:06 +01:00
Frank
3469648340 If MCU does not support analog, hide analog PIN settings
- hide "Analog Mic PIN" setting if I2S-ADC is not supported by the hardware
- In case of usupported config (PDM or ADC), overwrite dmType with default.
2022-11-25 12:53:24 +01:00
Frank
3f4e7a6a77 AudioSource parameter re-ordered
making "i2sMaster" the last optional parameter
2022-11-25 10:35:23 +01:00
Frank
dfd839de87 add braces around potentially-empty (debug) else branches
the compiler advises "suggest braces around empty body in an 'else' statement [-Wempty-body]". We follow.
2022-11-24 16:53:58 +01:00
Frank
8899704f91 Mic Profile for SPM1423
* added mic profile for SPM1423 (a new microphone board with PDM interface).
* npm run build (yo-man).
2022-11-24 12:28:11 +01:00
Frank
17e6a887cb FFT code restructuring, part2
puting mic filter and FFT post-processing into seperate funtions, to improve code clarity.
2022-11-23 14:39:19 +01:00
Frank
068e88453c FFT code restructuring, part1
- FFT code restructuring
- align definition of SR_DEBUG with WLED_DEBUG
2022-11-23 13:12:33 +01:00
Frank
1446bab3c5 I2S: another attempt to make "slave mode" work 2022-11-22 17:14:02 +01:00