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

2.9 Themes #3760

Closed
1 task done
tourerjim opened this issue Jul 4, 2023 · 18 comments · Fixed by #3762
Closed
1 task done

2.9 Themes #3760

tourerjim opened this issue Jul 4, 2023 · 18 comments · Fixed by #3762
Labels
bug 🪲 Something isn't working color Related generally to color LCD radios

Comments

@tourerjim
Copy link

tourerjim commented Jul 4, 2023

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

TX16s MKII updated to 2.9 but my own Themes screen goes black and not able to read anything from the screen, went back to 2.8.4 and my Themes screens fine and with 2.8.3

Cant edit my Themes on 2.9, cant see 'Edit' or the drop down to edit.

Expected Behavior

I assume I just copy over my sc card content and my theme.yml works

Steps To Reproduce

If I change from EdgeTX theme to my theme screen goes black

Version

2.8.4

Transmitter

Radiomaster TX16S / TX16SMK2

Operating System (OS)

Windows

OS Version

none

Anything else?

No response

@tourerjim tourerjim added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels Jul 4, 2023
@philmoz
Copy link
Collaborator

philmoz commented Jul 4, 2023

Please post your theme.yml file here so we can see what is wrong. You will need to rename it to theme.yml.txt.

@tourerjim
Copy link
Author

tourerjim commented Jul 5, 2023 via email

@pfeerick
Copy link
Member

pfeerick commented Jul 5, 2023

You'll need to upload this on Github - email attachments are ignored.

@pfeerick pfeerick added the color Related generally to color LCD radios label Jul 5, 2023
@tourerjim
Copy link
Author

theme.yml.txt..txt

@philmoz
Copy link
Collaborator

philmoz commented Jul 5, 2023

Open the file in a text editor and remove the blank line before the 'colors:' section.

@philmoz
Copy link
Collaborator

philmoz commented Jul 5, 2023

There was a bug in the YAML parser handling of blank lines.

2.9 changed the theme parser to use the same one as used by the model and radio files (which historically did not have blank lines unlike themes).

This should get fixed in a later version; but in the meantime you can work around it by removing any blank lines in the theme.yml file.

@tourerjim
Copy link
Author

Thank you, removing blank lines my themes are now working with 2.9

@pfeerick pfeerick removed the triage Bug report awaiting review / sorting label Jul 5, 2023
@tourerjim
Copy link
Author

Unfortunately there is still bit of an issue, to get my theme working I need to edit within your theme, correcting the spacing only worked when I edited within your theme ie FM2M_Concrete, if I transfer my theme from 2.8.4 or write my own it will not work and looking at the two pictures may help.
picture 1 is your .yml file (FM2M_Concrete) and file shows thunbnail blank, my edit picture 2 saved as .yml shows text lines on thumbnail.
Untitled1
Untitled2

@tourerjim
Copy link
Author

Your file (edited FM2M_Concrete)

@philmoz
Copy link
Collaborator

philmoz commented Jul 5, 2023

Check that Windows is not hiding a .txt extension on the edited file.

@tourerjim
Copy link
Author

Could you show example, I save in Notepad as theme.yml

@pfeerick
Copy link
Member

pfeerick commented Jul 5, 2023

In your own screenshot, you can't see an extension for the logo file, so the extension for your theme file may or may not be .yml. You need to go into the file explorer options, and untick the "hide extensions for known file types" option.
explorer_vJcHLYOtKM

Alternately, when you save it in Notepad, make sure you change the save as type from text document (*.txt) to All files (*.*), otherwise Notepad will always append .txt to the filename whatever you give it ;)
Notepad_WwifltDZWA

btw, I updated all the themes in the theme directory that have a blank line to remove them, so you can also just download the latest version of it from https://github.com/EdgeTX/themes/releases ;)

@tourerjim
Copy link
Author

Thank you, I'll try that.

@tourerjim
Copy link
Author

Alls good now, on 2.8.4 or lower I didn't have issues with image naming 'logo' and saving or .yml files in Notepad, but something has changed in 2.9 saving logo is now saved as logo.png & theme.yml as your 'image file options' theme.yml is now saved as 'all file types.

@pfeerick
Copy link
Member

pfeerick commented Jul 6, 2023

Neither the extension for the logo file (.png) or the theme file (.yml) have changed in 2.9, only how the theme file itself is read/written by the firmware.

Have a look at the name of the option in your file browser we directed you to, it isn't just "hide file extensions", it's "hide known file extensions". In the first screenshot you showed in #3760 (comment), your windows install doesn't recognise the file type, so shows a generic icon. In the second screenshot, it shows a different icon, hence the file extension (which you can't see, otherwise you'd also be able to see the extension for the logo file next to it was .png), so really that file was called theme.yml.txt, which is invalid. If you check on the radio using the SD browser, you'll see this also. You really need to turn that option off so that it isn't misleading you.

@tourerjim
Copy link
Author

Not sure if it's to do with Windows which done update on my laptop couple days prior to me updating to 2.9.
For me to edit theme.yml to work with 2.9 this is the file thumbnail that shows in Themes.

Untitled3
If I drop this file to here I get message (we don't support that file) but and strange thing is that same file works with 2.9 Themes.

@pfeerick
Copy link
Member

pfeerick commented Jul 6, 2023

More importantly, you can now see the file extensions for both, so know they are both correct. If you wanted to upload it to github, you would have to do what philmoz said back at #3760 (comment), which was

You will need to rename it to theme.yml.txt.

in other words, change the file extension so it ends with .txt, which is what GitHub said was one of the supported file extensions when you tried to upload the file. I think this is how you got yourself confused before, as when you changed the filename from theme.yml to theme.yml.txt, it became a "recognised file type", and thus the extension was hidden, meaning you could only see theme.yml. It's only when you turned that extension hiding nonsense off that you can see what the true file extension was.

Anyway, the important thing here is there was a change in how EdgeTX 2.9 reads/writes theme.yml files which you've helped us identify, and it's just a matter of ensuring there are no blank lines in the file to confuse the firmware.

@tourerjim
Copy link
Author

Your helps are well appreciated, an old boy trying to keep up with all this tech and am really pleased I've got all my own themes back now working.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working color Related generally to color LCD radios
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants