Updated Add own functionality (markdown)
This commit is contained in:
parent
ccea5e7ad8
commit
a425a31447
|
@ -73,4 +73,31 @@ Here is a step-by-step guide on how to make your effect:
|
|||
|
||||
2. TBD
|
||||
|
||||
If you programmed a nice effect you want to share, submit a pull request!
|
||||
If you programmed a nice effect you want to share, submit a pull request!
|
||||
|
||||
### Web UI
|
||||
|
||||
Changes to the embedded web user interface are not convenient. The reason is that the HTML is gzipped and added to the code as a binary array in `html_ui.h` to boost speed and lower flash usage.
|
||||
|
||||
If you want to test changes to the UI, it is easiest to work with the local `/wled00/data/index.htm` file. You just need to change a single line to have the local file interface to an ESP with WLED installed. Preview
|
||||
|
||||
Change
|
||||
`url = command ? '/json/state':'/json';` (0.9.1 line 1048, subject to change)
|
||||
to
|
||||
`url = command ? 'http://[Your ESP IP address]/json/state':'http://[Your ESP IP address]/json';`
|
||||
|
||||
**Important:** Do not forget to change it back before gzipping the UI file! Otherwise it will not work on any other WLED installation with a different IP address.
|
||||
|
||||
To serve your changes by the internal webserver, you will need to follow these or similar steps to gzip compress the `index.html` file:
|
||||
|
||||
- Gzip compress the file. I use [this online converter](https://online-converting.com/archives/convert-to-gzip/), use setting `Compress this file, output – gz`
|
||||
|
||||
- Rename file to `xxx.gz.png` (change file type to image)
|
||||
|
||||
- Convert it to a C-style byte/char array. I use [this converter](https://littlevgl.com/image-to-c-array), intended for image sprites. Therefore, the previous step of changing the file format was neccessary. Select `Raw` as Color format.
|
||||
|
||||
- Open the downloaded .c file in a text editor, e. g. Notepad++. Select the contents of the array and replace the array contents in `html_ui.h` with them.
|
||||
|
||||
- Update PAGE_index_L to the binary size stated in the bottom of the downloaded .c file
|
||||
|
||||
- Recompile and flash WLED!
|
Loading…
Reference in New Issue