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

Failing to read map and gaps after update from 0.14.4 to 0.15.0 #4376

Closed
1 task done
blind-coder opened this issue Dec 11, 2024 · 9 comments
Closed
1 task done

Failing to read map and gaps after update from 0.14.4 to 0.15.0 #4376

blind-coder opened this issue Dec 11, 2024 · 9 comments
Labels
bug workaround The issue contains a workaround

Comments

@blind-coder
Copy link

What happened?

After updating from 0.14.4 to 0.15.0, WLED fails to read 2d-gaps.json and ledmap.json randomly. I need to go to Config -> LED Preferences and hit Save a random number of times before the files get properly read.

To Reproduce Bug

Update from a working 0.14.4 ESP32 deployment with 2d-gaps.json and ledmap.json to 0.15.0
Enable any effect or check in Peek. Only a long LED strip will be visible, no matrix.

Expected Behavior

Succeed in reading 2d-gaps.json and ledmap.json every time.

Install Method

Binary from WLED.me

What version of WLED?

WLED 0.15.0

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

2d-gaps.json
ledmap.json

Code of Conduct

  • I agree to follow this project's Code of Conduct
@blind-coder
Copy link
Author

Sorry I can't provide logs or full version number, I rolled the ESP32 back to 0.14.4 already. The problem disappeared after rolling back.

@softhack007
Copy link
Collaborator

@blind-coder can you share your 2d-gaps.json and ledmap.json files, plus cfg.json from 0.14.4?
This might help to reproduce the problem.

@softhack007
Copy link
Collaborator

@blind-coder sorry, missed that you alread attached them 😅
Please just add your cfg.json

@blazoncek
Copy link
Collaborator

blazoncek commented Dec 11, 2024

FYI gap and ledmap cannot coexist at the same time on a device.

EDIT: Another FYI, 2D ledmap uses new fields, "width" and "height" otherwise a ledmap is considered 1D.

@blind-coder
Copy link
Author

Here's the cfg.json
cfg.json

@blazoncek that new format may be the issue. I have 15 LEDs in 5 rows, it's a bit weird. The setup with both ledmap and gap has worked fine on 0.14.4.

{"map":[
  -1,-1,14,-1,12,-1,10,-1,-1,
  -1,15,-1,13,-1,11,-1, 9,-1,
   0,-1,-1,-1,-1,-1,-1,-1, 8,
  -1, 1,-1, 3,-1, 5,-1, 7,-1,
  -1,-1, 2,-1, 4,-1, 6,-1,-1
]}

if you look at the map, each LED is a hexagon, and together they form "two overlapping ∞" if that make sense. I can provide a photo if it helps. The LEDs are connected in series.

@blazoncek
Copy link
Collaborator

Ledmap and gap file are incompatible. Gap file is ignored if default ledmap exists. You can have non-default ledmaps and use gap file but once ledmap is selected gap file will be ignored.
If you want default 2D ledmap you'll need to update ledmap file to include width and height. Gap file and non-default ledmaps have no such restrictions.

@blind-coder
Copy link
Author

blind-coder commented Dec 11, 2024

Okay, I think I understand. So I remove the gap file and add "width": 9 and "height": 5 to ledmap.json and it should work?

{
  "map":[
    -1,-1,14,-1,12,-1,10,-1,-1,
    -1,15,-1,13,-1,11,-1, 9,-1,
     0,-1,-1,-1,-1,-1,-1,-1, 8,
    -1, 1,-1, 3,-1, 5,-1, 7,-1,
    -1,-1, 2,-1, 4,-1, 6,-1,-1
  ],
  "width": 9,
  "height": 5
}

Like this?

@softhack007 softhack007 added the workaround The issue contains a workaround label Dec 15, 2024
@blind-coder
Copy link
Author

This seems to be working now with the width and height values. Thank you!
Adding this information to https://kno.wled.ge/advanced/mapping/#examples might be helpful.

@blazoncek
Copy link
Collaborator

@blind-coder I agree and you can add it to help the project.
https://github.com/Aircoookie/WLED-Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug workaround The issue contains a workaround
Projects
None yet
Development

No branches or pull requests

3 participants