Commit Graph

228 Commits

Author SHA1 Message Date
Damian Schneider
60e1698ed2 Improvements & fixes for HUB75 (#5026)
* Improvements & fixes for HUB75

- added proper config parameters to allow multiple panels
- added config checks
- fixed crashes on S3
- changed constant variables to constexpr
- added "wled.h" to bus_manager.cpp and removed local function prototypes (needed for buffer allocations)
- speed optimisations: yields about 10% higher FPS
- updated platformio_override.sample.ini
- some code cleanup
2026-01-03 09:56:10 +01:00
Damian Schneider
8b3975752c speed optimisations, fix for restoreColorLossy, code cleanup (#4895)
- speed optimization in color_add, PS fast_color_add and blur functions
- applying more bit and shift manipulation tricks to squeeze out just a bit more speed on color manipulation functions.
- Optimization on blur is based on work by @blazoncek
- Renamed PS fast_color_add() to fast_color_scaleAdd()
2025-09-23 20:15:42 +02:00
Will Tatam
ee5a70a63e Update: getNumberOfPins to load all pins from config for hub75 2025-09-20 18:03:08 +01:00
netmindz
011e72c3c1 Revert nPins = Bus::getNumberOfPins change
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-13 13:41:04 +01:00
Will Tatam
199bc45ae2 Merge branch 'main' into HUB75-AC 2025-08-31 12:53:25 +01:00
Damian Schneider
d5d7fde30f use video scaling instead of NPB luminance & new ABL (#4798)
* updated color scaling to preserve hue at low brightness resulting in much better colors
* replace NPBlg with NPB, moved brightness scaling to bus manager
* improved gamma table calculation: fixed mismatch in inverting gamma table calculation: inversion should now be as good as it gets
* code cleanup, fixed gamma being applied in unnecessary places

Improvements to ABL handling:
- removed strip level handling, ist now all done on bus level
- limiter now respects pixel mapping
- proper handling of white channel
- improved current estimation
- current is now always correctly reported to UI
- minimal FPS impact if the ABL is not limiting but slighly higher impact for global ABL limit due to double-scaling

- moved brightness scaling to BusDigital
- created new header file colors.h to be able to access color functions in bus-manager.
- updated colo_fade() with better video scaling to preserve hue's at low brightness
- added IRAM_ATTR to color_fade (negligible speed impact when compared to inline and benefits other functions)
- added IRAM_ATTR to color_blend as it is used a lot throughout the code, did not test speed impact but adding it to color_fade made it almost on-par with an inlined function

Additional changes:
- fixes for properly handling `scaledBri()` (by @blazoncek)
- also use bit-shift instead of division in blending for ESP8266
- improvements for faster "softlight" calculation in blending
- changed some variables to uint8_t to maybe let the compiler optimize better, uint8_t can be faster if read, store and set are all done in uint8_t, which is the case in the ones I changed
- various minor code formatting changes
2025-08-29 17:12:10 +02:00
Blaz Kristan
e7157e542a Add mDNS resolution for network bus 2025-07-12 18:44:38 +02:00
Blaž Kristan
a24420ae70 Fix #4268 2025-07-12 18:18:49 +02:00
Damian Schneider
9eb0c3c8e5 Bugfix: convert cctBlend value back to "%" for UI (#4737)
* Bugfix: convert cctBlend value back to "%" for UI
2025-07-06 16:22:44 +01:00
Damian Schneider
05557ca790 Bugfix: convert cctBlend value back to "%" for UI (#4737)
* Bugfix: convert cctBlend value back to "%" for UI
2025-06-20 10:55:53 +02:00
Will Tatam
009950e28f Update Hug75 to reflect changes in 0.16 2025-06-16 20:04:07 +01:00
Will Tatam
8ee12620f0 Merge branch 'main' into HUB75-AC 2025-06-16 20:03:34 +01:00
Blaž Kristan
ee9ac947a1 Segment layering & effect blending improvements
- Photoshop-style segment/layer blending
- return of strip ABL
- remove global LED buffer in favour of segment-local buffer
- new effect blending modes/transitions
- custom palettes moved out of WS2812FX class
- increased limits (matrix size, LED RAM)
- added "rainbow"-mode colorwheel
- replaced palettes with gamma unmodified ones
- move gamma adjustment to last step before sending to LEDs
- Segment & WS2812FX class reorganisation (mutable members, reordered members, protected members)
2025-04-22 22:37:18 +02:00
Blaž Kristan
a5277ff4a0 Merge fix 2025-02-25 16:01:30 +01:00
Blaž Kristan
a66f5d660d Merge branch 'main' into unlimited-bus 2025-02-25 13:54:42 +01:00
Blaž Kristan
c43d09c8b1 Move _data and allocation to derived class
- as suggested by @TripleWhy
- minimum length guard

Conflicts:
	wled00/bus_manager.cpp
	wled00/bus_manager.h
2025-02-07 16:18:53 +01:00
Blaž Kristan
1db3359b84 Replace unsigned with size_t 2025-02-01 12:07:31 +01:00
Blaž Kristan
5b7bab6752 Compile fixes 2025-01-30 20:46:26 +01:00
Blaž Kristan
bf69d37cbe Revert getBus() changes 2025-01-30 19:35:36 +01:00
Blaž Kristan
ee7ec20f29 Convert BusManager class to namespace
- use unique_ptr/make_unique for busses
2025-01-30 19:31:09 +01:00
Blaž Kristan
a98685d89e Remove numBusses, RMT idle bugfix
- experiment with std::unique_ptr
2025-01-19 21:37:34 +01:00
Blaž Kristan
7daea18907 Merge fixes & updates
- Segment::setName()
- S2 limits
- bus debug macros
- remove cctBlending from strip
2025-01-19 11:37:57 +01:00
Blaž Kristan
0c84235a95 Bus rework
- Implement vector in bus manager
- Memory calculation according to explanation from @Makuna
- Prefer 8 RMT before 8 I2S on ESP32 (fixes #4380)
- speed improvements in ABL
- verbose debugging
- get bus size from NPB (prototype)
- Parallel I2S output bugfix
- automatic selection of appropriate I2S bus (`X1xxxxxxMethod`)
- removed I2S0 on ESP32 (used by AudioReactive)
- renumbered internal bus numbers (iType)
- added buffer size reporting
2025-01-19 10:17:33 +01:00
Frank
013684b5ca making some parameters const, plus minor improvements
* changed some parameters to "pointer to const", so compiler can better optimize code size and performance -  because data behind a const pointer will never be modified by the called function.
* made setPixelColor `const`

* fixed a few potentially uninitialized local vars (the may have random values if not initialized)

* avoid shadowing "state" in handleSerial()
* plus a few very minor improvements
2025-01-19 07:35:46 +01:00
Will Tatam
f447df9873 Merge branch 'main' into HUB75-AC 2025-01-06 12:07:45 +00:00
Damian Schneider
cae98451e3 Merge remote-tracking branch 'upstream/main' into 0_15__speed_improvements 2024-12-20 09:12:01 +01:00
Blaž Kristan
b4aa8376de Idle current bugfix (#4402) 2024-12-17 18:59:53 +01:00
Damian Schneider
0a05611e1d more improvements to setPixelColor
- code is a bit cleaner and faster as well
- chaning array access to pointer access in bus_manager makes it a few instructions faster
- changed getNumberOfPins and getNumberOfChannels to return 32bit values, saving the unnecessary 8bit conversion
2024-11-26 20:59:36 +01:00
Will Miles
d53d7aa2e2 Defer calling begin() on digital buses
NeoPixelBus requires that all parallel I2S bus members be constructed
before any of them call Begin().  Implement this by deferring the
call to the end of bus construction.

Fixes #4301.
2024-11-23 12:34:06 -05:00
Will Tatam
c356846d90 HUB75 - fix hasRGB and missing override 2024-10-04 19:10:53 +01:00
Blaz Kristan
ba3a61f623 Reduced code size by:
- removing WS2812FX::setMode()
- removing WS2812FX::setColor()
- removing floating point in transition
- color handling modification in set.cpp
- replaced uint8_t with unsigned in function parameters
- inlined WS2812FX::isUpdating()
- (MAY BE BREAKING) alexa & smartnest update
2024-10-02 20:14:25 +02:00
Damian Schneider
7c0fe1285a updated setPixelColor() and getPixelColor() functions
uint16_t to unsigned to make it consisten throughout the hand-down.
colorFromPaletteWLED now returns uint32_t which saves the conversion to CRGB and back to uint32_t (in most uses at least).
also added (preliminary) CRGBW struct. I tried to use it in place of uint32_t colors but it adds a lot of overhead when passing the struct so reverted to uint32_t in most places.
updated a few FX to use the CRGBW struct and also cleaned some code to improve flash useage.
2024-09-28 15:26:14 +02:00
Will Tatam
fbeead0c74 Exclude hub75 from pin validdation for xml.cpp 2024-09-22 16:42:11 +01:00
Will Tatam
9a9c65ac8e Whitespace 2024-09-22 16:29:52 +01:00
Will Tatam
0a8d86cfc3 Always copy all the pin data 2024-09-22 16:23:19 +01:00
Will Tatam
e111b6e1b7 Hub75 - PIN_COUNT const 2024-09-22 15:53:40 +01:00
Will Tatam
b7aba15d58 Always copy all the pin data 2024-09-22 15:27:23 +01:00
Will Tatam
713cbb81b8 Merge branch '0_15' into HUB75-AC 2024-09-22 15:12:37 +01:00
Blaz Kristan
bd7cd32f91 Add mandatory refresh capability to remove type dependency. 2024-09-22 13:56:14 +02:00
Blaz Kristan
b50e6e0d90 Static PinManager & UsermodManager
- saves a few bytes of flash
2024-09-19 21:44:11 +02:00
Blaz Kristan
6a188033c6 Merge branch '0_15' into compile_different_busses 2024-09-14 09:27:37 +02:00
Blaz Kristan
49d51c5af8 Hot 2024-09-12 15:26:26 +02:00
Blaž Kristan
6169c458bf Remove void 2024-09-12 08:48:31 +02:00
PaoloTK
c5435ec1fa Merge remote-tracking branch 'AC/bus-config' into compile_different_busses 2024-09-11 23:04:37 +02:00
Blaz Kristan
5df1a223c2 Pre-allocate COM vector 2024-09-11 16:45:39 +02:00
Will Tatam
ad402adf7a Hub75 - Misc fixes - WiP 2024-09-08 19:58:37 +01:00
Will Tatam
e0d78d5328 Porting latest BusHub75Matrix from MoonModules - Mostly authored by Frank - MIT licence granted for this copy 2024-09-08 17:36:39 +01:00
Will Tatam
f96acd6263 Hub75 - Tweaks to webui 2024-09-08 17:06:04 +01:00
Will Tatam
e066b502c3 hub75 - remove hard coded panel sizes 2024-09-08 13:33:34 +01:00
Will Tatam
ecd46f2f06 Swap to new way to have dynamic LED types list 2024-09-07 20:29:43 +01:00