Skip to content

Conversation

@azariah001
Copy link

Adjusted and added more section headings to aid in finding specific information.

Expanded most sections with additional examples and specific callouts for config breaking issues, like not including a number in the filename and common file formatting issues.

Also added a new section about the previously undocumented custom naming key "n".

Adjusted and added more section headings to aid in finding specific information.
Expanded most sections with additional examples and specific callouts for config breaking issues, like not including a number in the filename and common file formatting issues.
Also added a new section about the previously undocumented custom naming key "n".
Copy link
Contributor

@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution.
Unfortunately there are several incorrect and misleading bits. Please revise.

Use this edit page to create a file called `ledmap.json`.
Use this edit page to create a file called `ledmap1.json`, where `1` is incremented for each map you load on your controller.

**Note:** If the filename is `ledmap.json`, the config file ***will not load***; the filename must end in a number even if there's only one config file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is untrue. ledmap.json is a default ledmap, loaded at boot or when "Default" is selected.

The ArduinoJSON library is *****extremely***** white-space sensitive.
If your `ledmap.json` file is not working, check for white-spaces where they should not be. The LED positions are zero-indexed.
The ArduinoJSON library is *****extremely***** whitespace sensitive.
If your `ledmap1.json` file is not working, check for white-spaces where they should not be.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best way is to minimize ledmap file and pass it through JSON parser 1st.

## Complicated maps

Use -1 in the map for gaps/blank/null LEDs.
LEDs can be mapped in the "map" array in any order, including out-of-order, allowing you to map custom and complex shapes using `-1` in the map for gaps/blank/null LEDs. In addition, not all LEDs in a segment need to be mapped in the map; you can leave out extra LEDs if they're not required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 translates to 65535 but any number above actual LED count will provide similar result - placeholder for skipped LED.

```


### Multi-line array, helpful in visualising 2D matrices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2D ledmap requires "width" and "height" keys. If omitted, the resulting ledmap is 1D and WLED will refuse to provide 2D support. Please include that info if you are suggesting to split lines for 2D.

{"n": "Double infinity map.",
"map":
[
-1, -1, 14, -1, 12, -1, 10, -1, -1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the preceding lines there was a warning about spaces and in this example, there are plenty of spaces present. Please avoid contradicting information.


The ArduinoJSON library is *****extremely***** white-space sensitive.
If your `ledmap.json` file is not working, check for white-spaces where they should not be. The LED positions are zero-indexed.
The ArduinoJSON library is *****extremely***** whitespace sensitive.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please substitute "ArduinoJSON" with "JSON parsing". Things have changed and ArduinoJSON is no longer responsible for ledmap handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants