Introduces new memory allocation functions, based on wled#4895 by @DedeHai
* keep a minimum of 15KB RAM available to UI - improves stability
* S3/S2/C3 automatically use "fast RTC Ram" for small data (reduces fragmentation)
* auto-detects PSRAM (or no PSRAM) when firmware was built with -D BOARD_HAS_PSRAM
* d_malloc() and d_calloc() prefer DRAM if possible (faster), but fall back to PSRAM when free RAM gets low.
If Channel is less than 0, it's clamped to 0 on line 134. Then on line 138, dmxData[0] is written with the value, overwriting the start byte that was just set on line 137. DMX Channel numbers should be 1-based (1-512). The bounds check should clamp Channel to a minimum of 1, not 0, to prevent corrupting the start byte
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* centralize font selection logic into getFontInfo()
* removed unneeded parameter "numberOfChars" from drawText()
* new file: wled_fonts.hpp to centralize font management logic (inline)
* only compile wchar16ToCodepage437 when WLED_ENABLE_FULL_FONTS
* minor cleanup
* explanation for CP437 glyph groups
* translation for MonnModules symbol
* "smiley" replacement for 4-bytes and overlong unicode codes
* always compile unicodetool.cpp (codepage translation still depends on WLED_ENABLE_UNICODE)
* bugfix: DrawString now skips over glyphs that would be rejected by DrawCharacter
* minor cleanup
* should properly decode all unicodes that fit into 2bytes UTF-16
* with error handling for well-known "malformed UTF-8" expoits
* puh, this stuff looks simple but the details are CRAZY 😝
part1:
* enable all bitmaps already defined in the font files (increases firmware by ~7KB)
* add traslation for unicode -> codepage437 (as used by font files)
Fix for LED and Scenes uncontrollable using Alexa.
Weird behavior regarding to the device names and shared scenes fixed with this.
Seen in issue Aircoookie/Espalexa#228 and fixed from @ams-hh
Tested by myself and works just fine. Created second pull request here because the library seems to be a bit different from the official Espalexa repo.
---------
Co-authored-by: Frank <91616163+softhack007@users.noreply.github.com>
Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
adding hints for the compiler for optimization.
In case your custom build complains about "const", just remove the keyword. based on e82f38e277, but going further :-)
* "const" class functions : function does not modify any class attributes ( --> "this" becomes const)
* __attribute__((pure)) : function return value depends only on the parameters and/or global variables. The function does not modify any global or static variables.
* __attribute__((const)) : function only examines arguments (no globals), and has no effects except the return value. This slightly more strict than "pure"
* hot: tells the compiler "this functions is called very often"
* cold: the opposite of hot
* fix DDP spec
* Adjust DDP type byte to latest spec
Allow receiving of RGBW DDP with either old or new bits per channel value
---------
Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
* prevent string buffer overflows (stack corruption)
* avoid division by zero (program might crash)
* avoid log(0) which is undefined, too
* use faster math routines for float (logf, powf)
... like the typical -C3
* Replaced a few direct Serial.printf with macros
* Always check if Serial is connected before printing (CDC sometimes hangs when trying to send/receive without connection)
Some additions:
pio.ini: add debug entries
cfg.cpp, set.cpp, xml/cpp: keep storing basic 2D setup
index.js: use ledmapFileNames
settings_2D.htm: keep using basic and advanced
FX_2Dfcn.cpp: use gaptable and also MM ledmaps
FX_fcn.cpp: extend enumerateledmaps with AC ledmapNames (but not used in UI)
Improve co-existence of several popular usermods with respect to shared I2C bus.
- ensure that i2c_sda and i2c_scl are used when defined
- ensure that HW_PIN_SDA / HW_PIN_SCL are not overwritten
- ensure that Wire.begin()nis always called with user-defined pins (remove rogue Wire.begin() without parameters)
- ensure that set.cpp / cfg.cpp use esp32-specific global Wire objects.
* 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)
* 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 f8db06c7c5cfe159f9fc03ebc08547fa3c9e9ebd.
* 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>
* added SparkFunDMX library dependencies
* changed variable names to avoid conflicts with SparkFunDMX library
* board version checks
* minor changes to DMX
* fix brightness when no shutter DMX channel is set
* fix compile issue on newer ESP32 variants