Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include ledmaps for 2D #1

Closed
dosipod opened this issue Nov 8, 2022 · 14 comments
Closed

Include ledmaps for 2D #1

dosipod opened this issue Nov 8, 2022 · 14 comments
Labels
enhancement New feature or request fxed in mdev fixed in latest mdev source code

Comments

@dosipod
Copy link

dosipod commented Nov 8, 2022

Hi ,
Some use custom maps a lot as a practical way of customizing the effects on the fly for custom fixtures like cubes , it is currently working fine with WLED 0.14.0-mdev (build 2210201) when the matrix is set to 1D but not when you setup the unit with 2D . In that case ledmaps are ignored .

Is your feature request related to a problem? Please describe.
Low priority feature request as it seems little user base

Describe the solution you'd like
Ledmaps are available with 2D

Describe alternatives you've considered
na

Additional context
Add any other context or screenshots about the feature request here.

Thank you for your ideas for making WLED better!

@dosipod dosipod added the enhancement New feature or request label Nov 8, 2022
@MoonModules
Copy link
Owner

MoonModules commented Nov 9, 2022

You say it is working fine with WLED 0.14.0-mdev when in 1D mode

I tried this (add "ledmap":1 in the api):

image

sometimes it works, but sometimes I got this:

image

(then need to remove corrupted presets.json in /edit manually)

Is this also the way you do it?
And works for you all the time?

@MoonModules
Copy link
Owner

And this also not working for me:

image

it can show the ledmap which has been set in the api, but changing it does nothing (old values still in the api), does it work for you?

@dosipod
Copy link
Author

dosipod commented Nov 9, 2022

Yes ledmaps works fine with 14.0-mdev (build 2210201) when in 1D mode . But adding "ledmap":1 manually or selecting from list do not have any effect with 2D setup .
We never go any error in our case when adding that to a preset , it is just ignored .Might be you see some other errors . We have tested the same on two units with 16x16 and 8x24 and we seen the same behavior
image

@ewoudwijma
Copy link
Collaborator

Found the errors I got are a different use case, will submit an issue to WLED AC for that

@ewoudwijma
Copy link
Collaborator

And working on ledmaps step by step: first fixed some stuff in WLED MM and added a pull request to WLED AC: Aircoookie#2885.

Also for me to learn ledmaps ;-)

@dosipod
Copy link
Author

dosipod commented Nov 15, 2022

Sorry to copy and paste but we sent that in discord , We are testing 0.14.0.3.0 ,in 1D the ledmaps are picked up and will apply correctly to a preset.
However selecting any other effects will reset to no ledmap and you have to save a preset for each effect with the ledmap . Also still as before ledmaps are ignored in 2D

@ewoudwijma
Copy link
Collaborator

ewoudwijma commented Nov 19, 2022

I left some wrong code. Just removed it in latest commit.

Can you test and let me know if okay, then I can close this issue

Yea yeah, ledmaps in 2D still ignored, will come ... some day ;-) (eta within a month)

@dosipod
Copy link
Author

dosipod commented Nov 20, 2022

Using 0.14.0.4.2 (build 2211192) selecting any other effects will no longer reset the ledmap so that part is solved .
For including 2D in ledmap , you may take your time as there is no rush , would be nice if you have a discussion open for that on gh as this post was meant as an enhancement to include 2D and might tell us if there is much interest or not

@ewoudwijma
Copy link
Collaborator

ewoudwijma commented Nov 20, 2022

I personally think that it is core functionality and not logical to have it not working in 2D and think it is doable to take the segment to logical matrix mapping, 2D uses, and apply ledmap to it:

[2,1,0] and [1,0,2] = [1,2,0]

Does that make sense?

@dosipod
Copy link
Author

dosipod commented Nov 21, 2022

Yeah agreed it is core functionality , one area is confusing to us is that 2D mapping is already used
with custom effects and hence we though that its already supported . I am not really sure of the outcome
with different fixture but we are hoping existing 2D effects would look better when correctly mapped.

We just found out that gaps in ledmaps is possible with -1 which is an example of undocumented feature
which I hope would help in tweaking 2D effects without the need to code new ones for none standard fixtures.

@ewoudwijma
Copy link
Collaborator

ewoudwijma commented Nov 23, 2022

@dosipod How is it used in custom effects then? It uses setPixelColor so it would go through the same logic …

@ewoudwijma
Copy link
Collaborator

@dosipod Is this change working as it should and can we close this issue and submit a pullrequest to add this to upstream?

@dosipod
Copy link
Author

dosipod commented Dec 1, 2022

@ewoudwijma
Hello , Yes ledmaps are now available with 2D setup as requested . Attached is the small demo we did and you tested . You may close or keep for others to verify .
Due to exams period we were not able to customize 2D effects using ledmaps to have good looking outcome for none standard fixtures such as cubes which is the real goal but that could be another topic along with rotated panels ,3d and few other items that we could discuss in another thread . Thank you
2D_MAP_14MM_11_21_2022

@softhack007 softhack007 added the fxed in mdev fixed in latest mdev source code label Dec 3, 2022
softhack007 pushed a commit that referenced this issue Dec 14, 2022
@ewoudwijma
Copy link
Collaborator

Closed as it is implemented in WLED MM

netmindz referenced this issue in netmindz/WLED Jan 3, 2023
Update tmpAgc comparison as per @softhack007.
ewoudwijma pushed a commit that referenced this issue Apr 5, 2023
Working proof of concept for ES8388
softhack007 added a commit that referenced this issue Nov 15, 2023
this is a band-aid fix for random crashes when switching between presets with multiple segments - crossfade disabled.

!! adding type initializers fixed it for me on -S3, however I still see (less frequent) crashes on esp32, due to heap corruption.

It took me hours to get a meaningful stackdump:

assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas")

Backtrace: 0x40084ee1:0x3ffb2570 0x4008e341:0x3ffb2590 0x40094709:0x3ffb25b0 0x4008534a:0x3ffb26e0 0x40094739:0x3ffb2700 0x400e9037:0x3ffb2720 0x400e917c:0x3ffb2740 0x400eaeeb:0x3ffb2760 0x40117ec5:0x3ffb27c0 0x401184ea:0x3ffb2800 0x4013509d:0x3ffb2820

  #0  0x40084ee1:0x3ffb2570 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402
  #1  0x4008e341:0x3ffb2590 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:128
  #2  0x40094709:0x3ffb25b0 in __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c:85
  #3  0x4008534a:0x3ffb26e0 in heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:360
      (inlined by) heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:345
  #4  0x40094739:0x3ffb2700 in free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c:39
  #5  0x400e9037:0x3ffb2720 in Segment::deallocateData() at wled00/FX_fcn.cpp:189
  #6  0x400e917c:0x3ffb2740 in Segment::resetIfRequired() at wled00/FX_fcn.cpp:206
      (inlined by) Segment::resetIfRequired() at wled00/FX_fcn.cpp:203
  #7  0x400eaeeb:0x3ffb2760 in WS2812FX::service() at wled00/FX_fcn.cpp:1216 (discriminator 2)
  #8  0x40117ec5:0x3ffb27c0 in WLED::loop() at wled00/wled.cpp:115 (discriminator 3)
  #9  0x401184ea:0x3ffb2800 in loop() at C:/src/wled00/wled00.ino:20
  #10 0x4013509d:0x3ffb2820 in loopTask(void*) at C:/Users/user/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50

ELF file SHA256: 18c20b536f4c6ef4
softhack007 pushed a commit that referenced this issue Dec 19, 2023
CroachX pushed a commit to CroachX/WLED that referenced this issue Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fxed in mdev fixed in latest mdev source code
Projects
None yet
Development

No branches or pull requests

4 participants