4049 Commits

Author SHA1 Message Date
Blaz Kristan
8e78fb4caa Merge branch '0_15' into 0_15__speed_improvements 2024-09-29 14:31:00 +02:00
Blaz Kristan
336da25463 Private global _colorScaled 2024-09-29 14:14:07 +02:00
Damian Schneider
ffbc8c5f70 Reverting addition of bool unScale, added new improvements and fixes
- Added pre-calculation for segment brightness: stored in _segBri. The impact on FPS is not huge but measurable (~1-2FPS in my test conditions)
- Removed `bool unScaled` from `setPixelColor()` function again (it has no/minimal impact on speed but huge impact on flash usage: +850 bytes)
- Removed negative checking in `setPixelColorXY()` and replaced it with a local typecast to unsigned, saves a few instructions (tested and working)
- Changed int8_t to int in `moveX()` and `moveY()`
- Removed a few functions from IRAM as they are now not called for every pixel but only once per segment update
- Removed a `virtualWidth()` call from `ripple_base()`
- Bugfix in `mode_colortwinkle()`
2024-09-29 13:55:00 +02:00
Blaz Kristan
10d8cfde85 Fix FX filter bug 2024-09-29 13:00:07 +02: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
Blaz Kristan
9114867578 Fix compiler error 2024-09-28 18:48:43 +02:00
Blaz Kristan
c842994df5 Pre-calculate virtual
- move SEGCOLOR() to Segment class
- add SEG_H, SEG_W macros
- try to speed up virtualXxxxx()
- compile warning fixes
2024-09-28 18:14:43 +02:00
Damian Schneider
202901b09f bugfix, ESP32 compiler requires the color order to be identical 2024-09-28 15:38:41 +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 Miles
9a4b56db6e Fix incorrect F-strings
A merge issue with end-oappend: some strings did not get correctly
converted from SET_F() to F(), which can cause crashes.
2024-09-27 21:06:21 -04:00
Damian Schneider
a76a895f1d bugfix 2024-09-27 06:17:26 +02:00
Damian Schneider
b404458369 fixed one forgotten replacement of rgb2hsv_approximate 2024-09-26 18:29:31 +02:00
Damian Schneider
c44b9f8659 Merge remote-tracking branch 'upstream/0_15' into 0_15__speed_improvements 2024-09-26 18:07:33 +02:00
Damian Schneider
bef1ac2668 Added HSV2RGB and RGB2HSV functions for higher accuracy conversions
- also added a struct to handle HSV with 16bit hue better (including some conversions, can be extended easily)
- the functions are optimized for speed and flash use. They are faster and more accurate than what fastled offers (and use much less flash).
- replaced colorHStoRGB() with a call to the new hsv2rgb() function, saving even more flash (new function is untested!)
- the 16bit hue calculations result in an almost perfect conversion from RGB to HSV and back, the maximum error was 1/255 in the cases I tested.
2024-09-26 18:06:41 +02:00
Blaz Kristan
906f8fc2e7 Fix C3 compiler issue. 2024-09-25 18:49:10 +02:00
Blaž Kristan
c600c6da63 Bus length fix 2024-09-25 09:33:16 +02:00
Blaz Kristan
3f3c986932 Merge branch '0_15' into end_oappend_v2 2024-09-24 21:43:47 +02:00
Blaz Kristan
3ccc5babc1 Remov superfluous #if 2024-09-23 20:39:16 +02:00
Blaz Kristan
fafb2eba69 Merge branch '0_15' into blending-styles 2024-09-23 20:36:08 +02:00
Blaz Kristan
33cf82a982 Indentations and a few optimisations
Restore addPixelColor() behaviour.
2024-09-23 18:03:17 +02:00
Blaz Kristan
bd7cd32f91 Add mandatory refresh capability to remove type dependency. 2024-09-22 13:56:14 +02:00
Damian Schneider
0a5400263b removed IRAM_ATTR from inlined function
when the function is inlined into a IRAM_ATTR function, it will also reside in IRAM. Forced inlining is recommended by Espressif if I understand this correctly: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/hardware-abstraction.html
2024-09-22 13:52:56 +02:00
Damian Schneider
17d59d3337 adding initialization to vStrip, added comment on padding bytes 2024-09-22 09:02:42 +02:00
Blaz Kristan
9cb3531e2d Remove erroneous file
Fix constant dependancy
2024-09-21 22:24:36 +02:00
Blaz Kristan
b50e6e0d90 Static PinManager & UsermodManager
- saves a few bytes of flash
2024-09-19 21:44:11 +02:00
Damian Schneider
a88436c620 revert removal of adding with saturation, renamed 'fast' to 'saturate'
- blurring now uses desaturated adding: it is faster most of the times and blurring adds scaled colors so should rarely (ever?) saturate, I saw no visual difference in tests.
- formatting
2024-09-19 08:49:18 +02:00
Will Miles
45cf90094a Rename destination for getSettingsJS
Use a name that makes it a bit clearer what the output is.  The new name
is applied consistently through most uses.
Usermods are not yet updated.
2024-09-18 23:35:36 -04:00
Blaz Kristan
ae1df20893 New names 2024-09-18 23:32:15 -04:00
Will Miles
71148740d4 Replace sappend and sappends
Use named functions to describe what's being printed.
2024-09-18 23:31:19 -04:00
Will Miles
4ef583c844 xml: Print optimization
Reduce the total number of calls by using printf_P and skipping atoi().
2024-09-18 23:27:42 -04:00
Will Miles
16f61ea96d Usermod: Implement shim for oappend
Use a static Print* to transform old oappend calls to print calls.
2024-09-18 23:18:52 -04:00
Will Miles
32f9616b6e Remove oappend
Remove the large stack buffer as we're just going to copy it in to a
heap buffer anyways.  Later we can refine the length estimation or use a
rope-style dynamic data structure like DynamicBufferList.
2024-09-18 23:18:51 -04:00
Will Miles
d4268ba070 handleFileRead: Skip duplicate FS check
Since we validate the file existence ourselves, no need to have
AsyncWebServer do it again.
2024-09-18 19:47:51 -04:00
Damian Schneider
696290527a cleanup and improved color_add()
- optimized color_add() again: now it is as fast with preserved ratio scaling than the "fast" variant was before (if no scaling is needed, it is even faster). plus it saves 250 bytes of flash
- bugfix in `color_fade()`
- removed a lot of whitespaces
2024-09-18 22:10:27 +02:00
Damian Schneider
686866c6f9 Merge remote-tracking branch 'upstream/0_15' into 0_15__speed_improvements 2024-09-18 08:10:45 +02:00
Blaz Kristan
72455ccde1 Missing "not" 2024-09-17 19:47:24 +02:00
Blaz Kristan
88fb860568 SAVE_RAM bugfix introduced by #4137 2024-09-17 16:34:38 +02:00
Blaz Kristan
ceed494cf7 Introduce common.js in settings pages 2024-09-17 16:26:11 +02:00
Blaz Kristan
ac8f919304 Serial improvements (can RX, canTX)
PinManager bugfix for unsigned long long
2024-09-17 16:21:52 +02:00
Blaž Kristan
7f1ec4802d
Merge pull request #4137 from felddy/feature/toggle_pallet_sync
Add the ability to toggle the reception of palette synchronizations
2024-09-16 16:19:19 +02:00
Blaz Kristan
d5777b7bce Fix for missing WLED_NUM_PINS check 2024-09-15 20:34:05 +02:00
PaoloTK
e34f179a82 fix pin conflict check logic 2024-09-15 20:27:44 +02:00
Blaz Kristan
ce5ee65d60 Merge branch '0_15' into blending-styles 2024-09-15 11:05:16 +02:00
Blaz Kristan
65a8dbfe41 FX: Usermod Temperature effect 2024-09-15 11:04:02 +02:00
Blaz Kristan
5708d7a6b8 Build bump, changelog update 2024-09-14 22:30:56 +02:00
PaoloTK
f16ed4697f fix isReadOnlyPin() logic 2024-09-14 18:58:53 +02:00
Blaz Kristan
81e412fe5b Use refernece to avoid ctor/dtor
Use PinManager to determine reserved pins
2024-09-14 14:54:42 +02:00
Damian Schneider
f3137eb0a9 updated Segment::color_from_palette
- gamma correction only where needed
- paletteIndex should be uint8_t (it is only used as that)
note: integrating the new `ColorFromPaletteWLED()` into this would require  a whole lot of code rewrite and would result in more color conversions from 32bit to CRGB. It would be really useful only if CRGB is replaced with native 32bit colors.
2024-09-14 14:49:36 +02:00
Damian Schneider
0e5bd4ed74 remove test printout 2024-09-14 14:11:29 +02:00