116 Commits

Author SHA1 Message Date
Blaž Kristan
4271588ecd unique_ptr fix 2025-02-25 16:06:13 +01:00
Blaž Kristan
a66f5d660d Merge branch 'main' into unlimited-bus 2025-02-25 13:54:42 +01:00
maxi4329
aa3fb7d165 update links to point to the new repo 2025-02-15 20:07:41 +01:00
Blaž Kristan
a0c55c6406
Merge pull request #4484 from blazoncek/parallel-I2S
WWA strip support & parallel I2S for S2/S3 (bumping outputs from 5/4 to 12)
2025-02-13 19:10:37 +01:00
Blaž Kristan
f3de45c6ad Remove reference to custom allocators 2025-02-09 21:43:35 +01:00
Blaž Kristan
ed91c54654 Uninitialised _data bugfix 2025-02-09 18:24:10 +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
Will Miles
4c50119ac2 Merge remote-tracking branch 'upstream/main' into esp8266-pwm-phase 2025-01-23 19:39:01 -05:00
Blaž Kristan
a98685d89e Remove numBusses, RMT idle bugfix
- experiment with std::unique_ptr
2025-01-19 21:37:34 +01:00
Blaž Kristan
1c4ba20646 Merge branch 'bus-improvements' into parallel-I2S 2025-01-19 12:41:17 +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
Blaž Kristan
cc011e39ce Bus creation bugfix
- speed improvements in ABL
- verbose debugging
2025-01-13 17:27:33 +01:00
Blaž Kristan
adead9b578 Bus wrapper modifications
- NeoPixelBus update 2.8.3
- automatic selection of appropriate I2S bus (`X1xxxxxxMethod`)
- removed I2S0 on ESP32 (used by AudioReactive)
- renumbered internal bus numbers (iType)
- added buffer size reporting

Bus modifications
- WWA strip support
- bus initialisation rewrite
- optional parallel I2S (ESP32, S2 & S3)
2025-01-12 15:17:22 +01:00
Damian Schneider
0ad65f4748 fixed CIE brightness calculation for PWM outputs 2024-12-23 14:57:22 +01: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
Will Miles
dcba1aad10 PolyBus: Clarify use of clock_kHz
While not used by most bus types, it's not an optional parameter.
2024-11-27 09:05:10 -05:00
Will Miles
acc8b9cdbc BusDigital::begin: Pass clock rate argument
Fixes bug introduced by #4312.
2024-11-27 09:00:25 -05: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 Miles
cb8dae1ddb PWM: Revert always apply dead time 2024-09-29 10:13:19 -04:00
Will Miles
59deebc961 Improve PWM on ESP8266
- Better phase updates without dropping samples
- Make second pin duty cycle always after first, even inverted
2024-09-29 10:00:27 -04:00
Will Miles
fe4b668107 Slightly reduce PWM jankiness 2024-09-28 23:12:03 -04:00
Will Miles
cc87b32206 Support PWM phase shifts on ESP8266
Use the phase-locked soft PWM from the Arduino core to implement the
same PWM phase management as ESP32s are using.  The soft PWM code is
vendored in, as it was previously, to add the NMI workaround from #4035.

Completes #4034
2024-09-28 23:07:28 -04: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
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
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
ac689a9a2e Remove array, un-inline calculateCCT 2024-09-06 12:19:04 +02:00
Blaz Kristan
9cc333b2bd Move LED types to individual bus type
- (credit @netmindz & @willmmiles)
Tuning.
2024-09-05 21:49:27 +02:00
Blaz Kristan
092a5a1ca3 Unsigned fix 2024-09-04 20:54:44 +02:00
Damian Schneider
d3c31c52a2 found a better way of deadTime subtraction, fixed inverted signals 2024-09-04 18:03:52 +02:00
Blaz Kristan
b1e58dd10d Optimisations
- renamed variables
- some tuning
2024-09-03 22:28:21 +02:00
Damian Schneider
2cc0aceac7 Bugfixes
- fixed maxBri value
- fixed overflow in dead time subtraction
- deadtime and offset now also work if signals are inverted (_reversed)
2024-09-03 19:14:50 +02:00
Damian Schneider
be7475fe66 bugfixes, removed debug printout 2024-09-02 22:06:46 +02:00
Damian Schneider
85e2f7eb34 fixed offsets and inverted signal plus dead time 2024-09-02 17:53:15 +02:00
Blaz Kristan
a3b28871c6 Dirty fix for newer framework 2024-09-01 12:27:41 +02:00
Blaz Kristan
2ca034bfa8 Remove ledc_set_duty_and_update
Add semaphoring
Determine CCT overlap
2024-09-01 11:43:22 +02:00
Blaz Kristan
0d035a08d6 Dithering support & bugfix in UI
Thanks to @dedehai & @zalatnaicsongor
2024-08-30 15:21:16 +02:00
PaoloTK
6655e2664e rebase to bus-config 2024-08-29 13:18:48 +02:00
Blaz Kristan
c51ce2eec7 Fix C/P error
Clarifications
2024-08-27 21:57:00 +02:00
Blaz Kristan
b2e00eb868 Introduce network type (previous virtual)
- phase shifting correction (limit to PWM CCT)
2024-08-27 14:11:56 +02:00