I was wondering why sometimes the new MCUs still work better in Arduino IDE, so compared our build flags to what is used in Arduino IDE:
-S2 always has -DARDUINO_USB_MODE=0
-C3 always has -DARDUINO_USB_MODE=1
-S3 supports all possible modes
- switch off debug messages to USBCDC, if WLED_DEBUG is not set
- ensure that analogread pins are valid - invalid pins cause lots of error messages and finally lead to watchdog reset on some MCUs.
* make SparlFunDMX driver more robust:
- made variables static (so they don't overlap with other global variables)
- made sure all valriables are properly initialized
- do not apply pinMode and digitalRead to invalid pins (as this creates problems on -S3, -C3 and -S2)
* disable DMX sending code (unneeded code that may case troubles)
pinmanager ran out out array bounds on -S2 and -S3, as these MCUs have more than 40 GPIO. As consequence, memory was overwriten, and pins > 39 were reported as "allocated" but not "owned".
Thisfixes the problem, by extending internal arrays so that up to 50 pins can be managed.
* Do not require commas between ! in fxdata
* Updating fxdata: Halfway through the FX list
* fxdata flags and optimizations
* Revert optional commas after !
* 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>
* feat(json): add wifi scanning
Adds wifi scanning to the JSON api at `/json/networks`. The initial
request will trigger a scan, subsequent requests will scan or return the
results depending on the state of the `WiFiScan`.
Add a `Scan` button next to the client ssid input, on click, scan for
networks, and change the input to a select with the found ssids.
Fixes: #1964
* Added option to go back to manual SSID input
Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
* feat(wifi): add compile time configurtation
Add `WLED_AP_SSID` and `WLED_AP_PASS` defines to allow configuring the
SoftAP SSID and Password at compile time. Default to existing values.
Add `WLED_AP_SSID_UNIQUE` flag to append the device portion of the mac
address to `WLED_AP_SSID`.
Exampleof all flags (note the quoting to preserve
"stringification"):
```
build_flags =
-D WLED_AP_SSID='"MyAP"'
-D WLED_AP_PASS='"MyPassword"'
-D WLED_AP_SSID_UNIQUE
```
* Removed two error defines
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
* Effect ID's back to 0.13 numbering
Needed for sync between versions and allow 0.13 presets to work in 0.14
* Effect ID's back to 0.13 numbering (part2)
* Add network debug printer
* hide settings for disabled features
If not enabled at compile time, this change hides "Sync interfaces" settings for Alexa, MQTT, Blynk, HueSync.
The html sections are just hidden by a <div> with style display:none.
* Update Animated Staircas for 0.14
* Faster strip updates.
* Add ESP32 variant display in update page.
* Net debug optimizations
Fix ESP8266 (unaligned progmem flash string reads)
Do not send an extra package for \n in println
Only resolve IP/hostname once
* Compile time option for PIR sensor off timer
* Fix Gitpod compiling (#2875)
* Install Platformio not in Gitpod Image
* Install platformio at runtime
remove outdated extensions
* Bugfix for color transitioning.
Return palette option for Candle.
Fix for "* Color..." palette hiding.
Comment out debug output.
* Optimization & bugfix for net debug.
- Inherited from Print class.
- Added UI option to disable net debug output.
* Reduce fxdata size by about 200 bytes
Removed redundant commas before semicolon delimiter (`,;` -> `;`)
No need to transmit `@` in /json/fxdata
* NetworkDebugPrinter packet optimization.
* Revert NetworkDebugPrinter changes.
* Remove flush() in bus manager.
* Optimizations.
Co-authored-by: Shaheen Gandhi <shaheen@fb.com>
Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
* Automatically set PC Mode if unset
based on the UserAgent
* slight reduction
Reduce flash usage a bit.
Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
* add 9 further alexa devices for calling presets 1-9
* use preset names from WLED for Alexa preset device names instead of hardcoded names
* update readme and version
* call alexaInit() at end of savePreset() to keep Alexa in sync with the preset IDs and names
* This reverts commit f8db06c7c5.
* change order to configured Alexa WLED name first, preset names afterwards
* fix status of devices when shown within Alexa, i.e. switching one preset on switches others off (except for alexaInvocationName)
* re-add getPresetName() after merge with master
* restore original readme for pull request
* restore original platformio.ini for pull request
* Logic simplification
* Pass string by reference
* Added number of presets check
* fix alexaInit() in case of alexaNumPresets==0
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
* BH1750 upgrades
Moved the definitions into the main usermods_list.cpp instead of having a section to copy across.
Added Home Assistant Discovery topic for light sensor. This is toggleable from the usermod menu.
* Configure pin, other enhancements, readme
Implemented pin manager
Made pins configurable at runtime
Improved info screen outputs
Added F() around strings
Updated readme
* Resolve conflict
* Merge branch 'main'
* Missing comma
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
* Add ESP32_DATA_IDLE_HIGH to enable data pin to go HIGH when relay is off
* forgot to remove Serial.print for ESP32_DATA_IDLE_HIGH
* forgot another ifdef preventing compilation on non-esp32 boards
* Extra checks that the bus is actually an RMT bus
Could still blow on new ESP32 variants, but now in a mergable state.
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
* Starting on Ping Pong Clock Usermod, still having to check the led indices and test the stuff out of it
* Adding some attributes to be configured, Added platformio_override
* Fixed LED Numbering, Changed Color to RGB to Work with Settings
* Removing LED Positions from Config
* Some documenting
* Removed example comments to make ping pong clock mod more readable
Co-authored-by: Schmailzl, Sebastian <sebastian.schmailzl@wk-it.com>
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
* implement analog clock as a usermod
* fix some bugs, use toki for time measurement, implement fading seconds
* added timezone handling to analog clock
* fixed looping second pointer, lower refresh rate
* removed mqtt debug code
* implement seconds effect choice
* adapt to 0_14 branch
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
* Release of WLED v0.13.3
* Fixed a type in the file name (#2781)
* Fixed the dependency (#2782)
* Usermod Wordclock update to use an alternatve wiring pattern (#2757)
* Update
* update readme file
* readme update
* Update readme.md
* Update readme.md
* Update readme.md
* Update readme.md
* Update platformio.ini
* Add number of UDP retries
Add a configurable number of retries to the UDP WLED sync function.
* Add migration from old eeprom settings
* Revert some accidental carry overs
* Correct issues found in pull request
Change default number of retries
Fix migration from old settings
* Make the minimum number of retries 0
* Import notify twice setting
Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
Co-authored-by: Soren Singh Dary <67230851+sorensd@users.noreply.github.com>
Co-authored-by: Patrick <40436536+paeppi88@users.noreply.github.com>
This fixes a "division by zero" in WLED_DEBUG code.
LittleFS init seems to take some time, so we can arrive at "Loops/sec" with 0 loops executed --> crash.
- adding USB-OTG to reserved GPIO
- no read-only GPI
- if PSRAM found, add pins for "octal" PSRAM to unusable list (octal PSRAM seems to common on S3)
- ESP32: 37 and 38 are read-only
Fixed no new 2D segments creatable in UI
Fixed brightness not applied if `"on":true` present in the same JSON api call
Fixed CJK text upside down in namelabel (rotate to nicer direction only if no CJK characters)
Gamma correction color enabled by default
- Info Page: add a small horizontal line below usermod specific part. Improves readability.
- updated 2D mapping mode of some 1D soundreactive effects
- alllow some effects to fade slowly, even slower that possible with SEGMENT.fade_out(). Looks nice.
not sure why - most effects only fade when using SEGMENT.fade_out(), while some need SEGMENT.fadeToBlackBy().
- Un-F() most segment JSON keys, decreases JSON doc usage by 47 B (increases static RAM usage by 32 B),
makes `extractModeDefaults` work without strstr_P
- Removed String from serializeModeData and serializeModeNames
- Set 0.14 version name "Hoshi"
also when user wants less than 16 bands.
Previously when users selected fewer bands (like 4 instead of 16), only the lowest freq channels were displayed.
... found that stupid commit messages get more attention ;-)
- use 22050 Hz for sampling, as it is a standard frequency. I think this is the best choise.
- redesigned the GEQ channels (fftResult[]) for 22Khz, based on channels found on old HiFi equalizer equipment. 1Kzh is now at the center; Bass/Trebble channels are using 1/4 on left/right side respectively - similar to real equalizers. Looks nice :-)
- adjusted effects that use FFT_MajorPeak so that the maximum frequency is supported.
- new feature: "Input Level" (info page) can be used as global "GEQ gain" - only when AGC is ON (was already possible when AGC=off)
- some parameter tweaking in FFT function
- hidden feature: FFT decay is slower when setting a high "dynamics Limiter Fall time" (steps: <1000, <2000, <3000, >3000)
- FFT_MajorPeak default 1.0f (as log(0.0) is invalid)
- FX.cppp: ensure that fftResult[] is always used inside array bounds
- removed broken FFTResult "squelch" feature. It was completely broken, and caused flashes in GEQ.
- added Frequency scaling options: linear and logarithmic
- fixed a few numerical accidents in FX.cpp (bouncing_balls, ripplepeak, freqmap, gravfreq, waterfall)
- fade_out() appears to finally do something meaning. Old fade_out values were too high. Adjusted so effects in 1D look similar "classic" SR WLED
- frequency reactive effects: max FFT frequency of 5120 Hz is hard-coded in most effects. Updated ranges to 10240 Hz