-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add layout 4+2B right side 3QRT+1QRT #3315
Conversation
There is a problem in simulator (not tested on the radio). I can set and configure this layout, and it gets saved to model2.yml file. But when starting simulator again this layout (and the following layouts) doesn't show up (see last picture). |
Was this using the standalone simulator or did you run the simulator from Companion? If you start the simulator from Companion then changes made in the simulator are not saved on exit. |
Just fixing it right now, it seems to be related to layout name length |
I'm testing with Simulator directly, not using Companion. |
Might be better to set LAYOUT_ID_LEN to 12 to avoid potential data alignment issues in CustomScreenData. |
Just a FYI, any changes to |
I couldn't get the LayoutId "Layout4P2B" with 10 chars working, so I shortened the Id to "Layout4PB" with 9 chars. Now it works properly. |
@pfeerick can you approve the workflows so I can get built the windows version of Companion & Simulator (too lazy to set up the Windows toolchain). So far I've only tested the Linux version. Thanks. |
@daniel-snowsurf changing the radio data struct will also require a matching change in Companion or the field will be truncated on writing the yml files. For this PR you need to change this line
|
Thanks @elecpower, already found it, but changing LayoutId length is not working, The whole layout is not properly saved into the YAML file. The custom screen data is generated properly, but the YAML writer is not getting it right. Any clue? |
@daniel-snowsurf which yaml writer? Radio, Companion or both? |
AFAIK the LayoutID is only used when saving/loading from the yaml file - it is not shown to the user, so it can be anything we want it to be. There is no reason for all the layout ID names to start with 'Layout' - shorten this to 'Lyt' and you have plenty of room for other stuff. |
Good point... probably something for a future PR though, as it would need a custom reader added to convert |
I wasn't suggesting changing the existing ones - just that any new layouts, like the one, can be more flexible with their naming. |
Thanks @pfeerick for your work. The simulator works nicely with the T18 radio in Windows. With that I can update my models and widgets to EdgeTX. Waiting for the merge. |
Thanks for the confirmation. While I agree with Phil that the internal use layout names could be shorter, I think they should all be uniformly named so they are easily managed and no mistakes made later if they do get changed. i.e. it's the incremental changes that have a habit of shooting us in the foot, three or four changes later. |
Tested on Radioking TX18S, the new layout works fine. |
Add a new layout 4+2 where the right side of the screen has two areas with 3 quarters and 1 quarter in height.
Changes apply to radio firmware and Simulator.