Commit Graph

445 Commits

Author SHA1 Message Date
Ewoud
ca5a54bb72 Merge branch 'mdev' into audio_fastpath 2023-05-04 17:52:21 +02:00
Ewoud
642dbfed85 GFX default on, if set off it stays off (until page refresh) 2023-05-04 17:51:33 +02:00
Frank
7d0e627e14 some effect optimizations
* getpixelcolor: attribute pure - it reads memory, but does not write
* some optimizations for SEGMENT.blur() and SEGMENT.fadeToBlackBy()

* FX.c:pp remove double calls to blur() and fade_out()
* FX.cpp: SEGMENT.setUpLeds() added to effects, to enable LED buffering (safe some time because getPixelColor does not need to access NeopixelBus)

* a few other optimizations to safe time and avoid "expensive" operations
* set I2C bus speed to 400kHz (default is 100Khz)

* a few other small optimizations and tweaks
* pio: esp32 V4 builds use "patch5" toolchain version, which contains a few bugfixes especially for memory management.
2023-05-03 20:33:23 +02:00
Frank
40c96c14f5 a bunch of smaller speedups to core functions
*  make local functions "static"
* use fast_ int types where possible
* use native min/max instead of MIN/MAX macros. Macros evaluate each parameter TWICE!!
* adding __attribute__((pure)) and __attribute((const)) to help the compiler optimize
* ws.cpp: reduce max "live leds" in fastpath mode
2023-04-30 18:41:30 +02:00
Frank
8e9db0adde more accurate FPS forESP32
the standard millis() code is very inaccurate in the "high FPS" ranges. This replaces it with the esp32 high resolution timer.
2023-04-21 17:34:01 +02:00
Frank
9130e4be54 minor optimization of core LED functions
* use _fast_ integer types in loops - in contrast to "uint16_t" etc, the compiler can leave out range/overflow corrections, so it might run faster.
* fcn_declare.h: revive "WLED_USE_REAL_MATH" option, which can be a bit faster on ESP32.
2023-04-21 16:44:58 +02:00
Frank
00661de7fc accept up to 250 fps target in LED preferences
warning included.
2023-04-21 15:26:35 +02:00
Frank
d90ee766f6 PSRAM: you can have it, and eat it or not eat it
*This patch allows to compile with BOARD_HAS_PSRAM, but not set WLED_USE_PSRAM - reserved pins will be protected, and PSRAM usage will be shown in info.
* if you add `-D WLED_USE_PSRAM_JSON` then PSRAM will be used for some JSON buffers, but not for LEDs and Segments.
2023-04-19 17:58:50 +02:00
Frank
cc9a19bc1d partial merge of upstream/main
* leaving out DotStarHspi5MhzMethod, as we are still on NPB 2.6.9 for eth boards
* leaving out the index.css/index.css changes, as I'm not sure how to merge this.

@ewoudwijma we need to merge the JS and CSS parts when you are back; I'll stay with our MM version for now.
2023-04-14 19:53:04 +02:00
Will Tatam
cc25a21bcb Merge branch 'mdev' into audio-palette-updates 2023-04-14 18:28:43 +01:00
Frank
10ca7c83ca enumerateLedmaps: prevent buffer overflow
make sure that bounds of char fileName[33] are not exceeded by sprintf.
2023-04-14 18:33:07 +02:00
Ewoud
df4be5550f Net Debug = Net print and tablet pc mode on 1024 2023-03-27 14:47:13 +02:00
Ewoud
5611a54a1a Merge remote-tracking branch 'upstream/main' into mdev 2023-03-26 21:19:11 +02:00
Blaz Kristan
13678cb8d5 Add adjustable Random Cycle time.
- solves #3147
2023-03-25 21:28:30 +01:00
Ewoud
a66274d532 Random Cycle -> Random Smooth + netdebug/serial bugfix 2023-03-24 15:36:00 +01:00
Ewoud
8485be27f2 Merge remote-tracking branch 'upstream/main' into mdev 2023-03-21 11:39:30 +01:00
Ewoud
5ac9ffa073 Harmonize ledmap and jmap
ledmap: no lm prefix

jmap:
- also json extension (instead of jmap)
- also support json object with json array embedded:

{"n":"snake32"
,"width":32
,"height":32
,"map": []
}
2023-03-17 15:44:23 +01:00
Ewoud
e3e5825618 Simplification of ledmap width and height segment settings
(no recreation of panels anymore so back to default shows original)
2023-03-17 13:44:52 +01:00
Ewoud
a0576ba591 restore MM functionality to not reset segments if 2D settings change!!!
customeffects.js:
- rename downloadCEFile to downloadGHFile
- downloadGHFile: add GH ledmaps folder

FX_fcn.cpp and set.cpp:
- change makeAutoSegments with resetSegments(true)
2023-03-13 21:35:48 +01:00
Ewoud
2f024568de Fix for smaller number of pixeld than matrix size.
Borrowed from upstream / onepx-segment
2023-03-11 21:18:21 +01:00
Blaz Kristan
7c186e4fcc Fix for smaller number of pixeld than matrix size. 2023-03-11 15:03:28 +01:00
Ewoud
9f282f831e GEQ: even distribution of bands and small changes
FX.cpp: GEQ: even distribution of bands
FX_fcn: tiny change
wled.cpp: setupMatrix also if loadedledmap != 0
ws.cpp: replace getLengthTotal by width * height (for ledmaps)
2023-03-11 13:59:23 +01:00
Blaz Kristan
763b64cc57 Combat low memory condition on ESP8266. 2023-03-10 15:20:50 +01:00
Ewoud
c16532126a Ledmap refactors
Refactor ledmap in index.js and FX_fcn.cpp (remove physical)

WS2812FX::setPixelColor and gPC: check index after ledmap applied
2023-03-09 15:08:26 +01:00
Ewoud
7f7da1c52c Bugfix 2023-03-07 14:02:01 +01:00
Ewoud
10c5d8f20f Refactor setUpMatrix, deserializeMap for ledmaps 2023-03-07 13:56:18 +01:00
Blaz Kristan
ddd32bd600 Multiple fixes.
- compiler warning fixes (gcc17)
- revert min heap size to 8k
- fix form submitting in 2D settings
- remove IRAM_ATTR for ESP8266 core 4.1.0
2023-03-05 22:56:14 +01:00
Blaz Kristan
c151221d12 UI fixes & revert forcing ULTRAWHITE for on/off bus
Reduce min heap for 8266
2023-03-02 18:21:55 +01:00
Ewoud
f7e297160f ledmap file properties: width, length, physical and segment resize 2023-03-01 17:00:49 +01:00
Blaz Kristan
7a2f556682 Bugfix for 1 pixel segment capabilities. 2023-02-28 19:08:41 +01:00
Ewoud
6b659ab52e Add physical ledmap support + tiny changes
index.js, FX_fcn.cpp
- add physical ledmaps (lmPxyz.json)
2023-02-28 17:17:22 +01:00
Blaz Kristan
3ca7006e3a Tweaks & bugfixes.
One pixel segment handling.
- added 0D FX metadata (1 pixel effects)
- ignore palettes for White only segment
- ignore color for non-RGB & non-White segment (on/off)

Bugfix
- proper auto segment creation
- hide palettes for non RGB segments
- some tweaks for #2984
- force Solid for some FX (causing crash) on 1 pixel segment

UI Optimisations
- slider tooltips
- tiny bit smaller tooltips
- hide segment power if only one segment
- gap between sliders
2023-02-25 09:41:15 +01:00
Ewoud
4a5cbc9879 Merge remote-tracking branch 'upstream/main' into mdev
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)
2023-02-22 16:09:27 +01:00
Christian Schwinne
220718cb58 Remove Blynk support (#3102)
Change default palette for Railway to Colors 1 and 2
2023-02-21 17:07:32 +01:00
Ewoud
d0c57c8c26 Merge remote-tracking branch 'upstream/main' into mdev 2023-02-15 22:23:49 +01:00
Blaz Kristan
3ffc58d442 Bugfix
- segment capabilities on 2D segments and ledmaps
- UI segment update
- auto segment creation 2D + 1D
2023-02-15 20:36:54 +01:00
Ewoud
6e187dd5aa Peek in segment tab
Move peek 2D functionality to peek.js

FX_fcn.cpp: always erase customMappingTable if non existent ledmap

wled_server.cpp: add peek.js

index.js:
- add canvasPeek
- change resize of canvas
2023-02-15 12:41:15 +01:00
Ewoud
d8f625beea show only ledmap pixels, show bus lengths in segment visualization
index.js: segment visualization:
- max width if no pc
- don't show nr if only one segment
- Ledmap nr color depending on bus output

FX_2Dfcn.cpp / FX_fcn.cpp
- don't show ledmap -1 pixels

json.cpp: add busses.length to outputs

ws.cpp: peek back to strip.gPC only
2023-02-14 17:22:58 +01:00
Blaz Kristan
92d2be3f5e Add ledmap names
Bugfix
- reset segments upon 2D ledmap allocation error
- fix invlid 2D segments
2023-02-14 17:11:58 +01:00
Blaž Kristan
a7cded21f7 Merge branch 'main' into led-gaps 2023-02-14 14:28:10 +01:00
Christian Schwinne
74156b7ed8 Support white addressable LED strips (#3073)
* Support white addressable LED strips

* Various white handling tweaks

Allow RGB controls for white-only busses depending on AWM (makes palette-only FX work on non-RGB addressable busses)
Fixed RGB controls hidden if segment contained any non-RGB bus (even though there is also an RGB bus in that segment)
New Max auto white mode
Added hasCCT() bus method
Rename methods to be clearer
WS2811 White getPixelColor fix()

* Fix merge conflict (bus manager cpp)
2023-02-14 01:33:06 +01:00
Ewoud
9ba9a61af5 Add support for default ledmap.json + peek with ledmap if default panel
Thx to @Troy#2642
2023-02-13 19:09:02 +01:00
Ewoud
0d0f6b5e30 refactor resetSegments to work properly
add boundsOnly
2023-02-13 15:54:18 +01:00
Ewoud
d215633578 enumerateLedmaps and deserializeMap bugfix
Also xOffset and yOffset 8 instead of 16 bit
2023-02-13 14:22:45 +01:00
Blaz Kristan
821f320347 Add user selectable Gamma
Add panel visualisation (@ewoudwijma, #3090)

Bugfix:
- PIR onStateChange() ignored until inited
- remove matrix orientation
- ignore removing ledmap 0 if 2D
- _globalLeds size
2023-02-12 13:18:30 +01:00
Ewoud
6c52a3d940 Segment name for ledmap names
index.js:
- add ledmapFileNames array and fill with lm.segmentname.json names
- use name in dropdowns and in loadmap

fcn_declare and util.cpp: move enumerateLedmaps to FX.h and FX_fcn.cpp
FX_fcn.cpp: deserializemap: use segment name lednames
2023-02-12 11:28:38 +01:00
Blaz Kristan
eee9274098 Bugfix.
- compiler warnings
- loading nonexistent default ledmap in 2D will revert to built ledmap
- making autosements after 2D set up change
2023-02-11 18:41:30 +01:00
Blaz Kristan
8dd1f89225 Update.
- allow ledmap selection in UI
- upload gap file
- expand matrix generator
2023-02-10 19:49:43 +01:00
Ewoud
d42f24207d Ledmaps bugfix 2023-02-10 16:57:07 +01:00
Ewoud
40e82166bc Ledmap persistent/consistent and showing in segment graph +small changes
pio.ini: remove ping pong clock from _all
ce.js: change on error handling
liveviewws2D: add colorAdjust
json.cpp: ledmaps will be stored in json/info 
settings_2D: fieldChange at loadJS

FX_(2D)fcn.cpp:
- loadedLedmap default 0 (default)
- loadedLedmap active then only use if index <size

index.js:
- global ledmap set to active value
- draw to drawSegments
- gradient colored leds
- add ledmaps to graphics
- add fetchAndExecute (from custom effects), used by drawSegments to get ledmap contents
- graphics bigger in non pc mode
2023-02-10 16:26:35 +01:00