Commit Graph

62 Commits

Author SHA1 Message Date
Frank
49130c9ec9 (chores) cleanup some compiler warnings
* switch-cases that fall through
* potential buffer overflow in improv.cpp
* potentially uninitialized variables in FX.cpp
* potential array out-of-range on segment::col[]
* minor optimization: only apply gamma correction when result is needed
* tag some possibly unused variables with   [[maybe_unused]]
2026-03-11 13:54:58 +01:00
Frank Möhle
cce3c0b5d3 psram-aware malloc functions (backport of upstream #4895) (#342)
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.
2026-02-18 17:57:47 +01:00
Ewoud
5cf908ea25 Remove obsolute usermods - post 2024-02-08 23:02:10 +01:00
Frank
8905992a89 code spell checking - part4 (MM specific) 2023-12-15 00:14:57 +01:00
Frank
9024872f63 code spell checking - part3 (usermods)
if you can spell Fahrenheit, you can't spell Celsius. And vice versa :-)
2023-12-14 22:22:46 +01:00
Ewoud
17147f3b50 Prepare for upstream merge: seperate declarations from definitions
In rotary and 4ld
2023-06-27 22:21:20 +02:00
Frank
2f274399f3 UM rotary bugfix
fixing a crash that was caused by calling updateInterfaces() too often.
2023-03-13 19:13:46 +01:00
Frank
910ce494b4 usermod bugfixes
* rotary ALT: changing brightness did not   have an effect (stateUpdated missing)
* four-line-display ALT: allow clockmode without NTP (network time)
 - there are other possible time sources, like RTC.
2023-03-13 11:35:48 +01:00
Frank
062eb75d06 usermod bugfixes
fixing some "missed corner cases" in popular usermods.
* acessing unitialized arrays
* trying to draw on a non-initialized display
2023-03-08 20:37:27 +01:00
Frank
e1f14628b0 4LD + rotary hotfix: corrupted display on esp32
This s a temporary fix for display problems (corrupted display, sometimes crash). These problems exists since 0.14. as display updates are now running in a separate task.
The fix is still incomplete.

If nothing else works, you can use the 0.13.x behavior by compiling with `-D FLD_ESP32_NO_THREADS`

* fixing a few unsafe string operations and non-initialized strings
* fix max length for "two lines" names
* make sure that display methods are exiting early if display is not configured
* rotary_ALT : additional checks to ensure that drawing on the display does not overlap with redraw
* added some safeguards to prevent overlapping display redraw operations
--> Actually this should use semaphore/mutex instead of global booleans -> Still on my toDo list.
2023-02-02 18:37:13 +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
Ewoud
357e3638d4 New esp8266_4MB_max entry to test usermods / i2c
pio.ini: add esp8266_4MB_max with pir, dallas, relay  games (to test IMU) 

addHB: use string literal instead of var

appendConfigData to um multirelay
2023-01-17 13:07:50 +01:00
Ewoud
474243938c Hardware pin defaults in i2c and spi pin dropdowns
bugfix: replace oappend(SET_F(name)); by oappend(_name);

const.h: remove unset of 8266 variables as no behind the scene actions, this is just bad behavior and the pin drop downs will show this bad behavior

xml.cpp: show hardware defaults as ⍼ in dropdowns (better icon needed)
2023-01-15 17:08:39 +01:00
Ewoud
2187aa5728 implement addHB (Usermod help button utility function)
See https://github.com/Aircoookie/WLED/pull/2965
2023-01-07 12:22:29 +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
Frank
e85c90dc11 support for rotary without push button
Allows pinC = -1
2023-01-01 22:19:25 +01:00
Frank
8ef0a56dd8 usermod rotary - dont register pins if disabled 2023-01-01 21:30:21 +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
3160a0b090 Merge remote-tracking branch 'origin/ac_main' into mdev 2022-12-06 14:38:49 +01:00
Frank
a2c707831c rotarybugfix fix 2022-12-05 14:20:38 +01:00
Frank
fced662e49 rotary encoder bugfixes
- do not call pinMode on pin = -1 ([E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected)
- support encoder without "C" pin, i.e. no pushbutton function
2022-12-05 14:04:16 +01:00
cschwinne
efc476e50b Disable register keyword to reduce compiler warnings
Minor formatting improvements
"ps" string optimization
Removed travis envs
2022-12-03 20:55:17 +01:00
Ewoud
8f4c6d625d Fix typo USE_ALT_DISPl/LAY 2022-11-28 20:42:09 +01:00
Ewoud
91c2ce0d8f Merge remote-tracking branch 'origin/ac_main' into mdev 2022-11-28 19:58:51 +01:00
Blaz Kristan
8899684092 Select custom palette bugfix. 2022-11-25 17:33:29 +01:00
Frank
6404bb55ee rotary encode (alt): avoid starvation
* for installations with >1000 LEDs, strip.isUpdating() is true almost all the time. This fix ensures that rotary are polled at least every 4 ms (250Hz)
* fixing a few potential string buffer overruns.
2022-11-19 19:59:37 +01:00
ingDIY
503835d47e submitting PR
Here they are the PR #2776, #2803 and #2804 rebased for 0_14 branch,
I hope that now they are OK!
2022-10-02 23:23:24 +02:00
Blaž Kristan
f385af595a Add setMode() and setPalette() methods
- automatically start transition
Implement load FX defaults for HTTP API (FXD)
2022-09-29 12:49:12 +02:00
Blaz Kristan
a46894f395 Bugfixes. 2022-07-19 16:16:43 +02:00
Blaz Kristan
6c6849d8d7 Vectors & dynamic loadJS.
- Segments
- Modes

NOTE: crashes ESP if effect is running while deleting segment.
2022-07-17 15:58:41 +02:00
Blaz Kristan
d9f2c2b968 Segment API
- moved all drawing logic to segment
- moved transitions to segment
Conditional 2D compile.
Rearranged effect IDs.
Implemented dynamic effect arrays.
2022-07-10 22:23:25 +02:00
Blaz Kristan
64fd207533 Refactoring WS2812FX class.
- effect functions no longer part of class
- methods to access private members
- separate Segment, Segment_runtime, ColorTransition from WS2812FX
2022-07-06 13:13:54 +02:00
Blaz Kristan
4c759083be Multiple changes.
Added:
- introduced addEffect() and setupEffectData()
- conditional compile for audio effects
- introduced getModeData() and getModeDataSrc() instead of public var
- changed _modeData[] to private non-static

Fixes:
- DMTYPE use
- add reboot info to DMTYPE
- transpose & reverse with mirroring
2022-06-21 22:49:45 +02:00
Blaz Kristan
e146a476bd Effect ID compatibility with WLED-SR
Updated some SR effects.
2022-06-15 17:21:32 +02:00
Blaz Kristan
f1a1b89d13 Fixes.
- correct preset cycling
- updated rotary encoder preset selection
2022-06-03 22:22:18 +02:00
Blaz Kristan
793c878c66 Added display information for hue/sat/preset/cct 2022-06-02 18:30:23 +02:00
Blaz Kristan
17be0a2c12 Enhance rotary encoder with custom sliders.
Soft watchdog timer (by poelzi)
2022-05-24 13:45:35 +02:00
Blaz Kristan
8c31904838 Updated rotary encoder ALT to support modes array. 2022-05-22 12:56:01 +02:00
Blaž Kristan
23d7c3d0fe Merge branch 'master' into merge-master 2022-02-24 13:43:12 +01:00
cschwinne
ed90b638a9 Main seg replaced by first selected in internal interfaces
Version bump to 0.13.0-b7
Various small improvements
2022-02-23 19:20:07 +01:00
Blaž Kristan
8af445e72b Merge branch 'master' into merge-master 2022-02-22 10:42:00 +01:00
cschwinne
44739c5198 Merge effectChanged and colorChanged to stateChanged 2022-02-21 22:12:13 +01:00
Blaz Kristan
41b6f3ffa7 Merge branch 'master' into merge-master 2022-02-20 22:24:11 +01:00
cschwinne
7b969bb8c2 Various state changed logic simplifications
Changed main segment, must be selected
2022-02-16 21:12:33 +01:00
Blaz Kristan
f6b44e03ac Removed unused code in rotary encoder. 2022-02-10 13:09:22 +01:00
Blaž Kristan
0a5a0bef48 Enhanced usermods. (#2522) 2022-02-01 09:33:57 +01:00
Blaz Kristan
80f7c5ed9d Added CCT to rotary encoder. 2022-01-19 20:39:00 +01:00
Blaz Kristan
8d33cbeaca Fix for effect not being applied using rotary encoder. 2022-01-19 16:53:21 +01:00