EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.59k stars 339 forks source link

Category Editor #698

Closed dlktdr closed 3 years ago

dlktdr commented 3 years ago

I've been working on a Category Editor https://github.com/dlktdr/edgetx/tree/category_editor and so far have the ability to Add / Remove / Rename and Move models between categories working. Onc glitch if you add one and instantly rename it will crash I still have to figure out yet. but... real reason for making this issue is I'm looking for advice on proper method on what to do about menu Icons (Even though probably don't need really need them ;)

1) What kind of icon to use.

2) How to save the information I assuming would have to be saved into RADIO/models.txt. Was thinking directly below the header if there is a icon= such as below it will call it up, if nothing use the default Plane. Kind of like an ini file, maybe a : to signify its not a file. But I'm not sure if this is going to cause issues with how companion or future ETXCompanion is going to work?

[Drones] :icon=23 model1.bin model2.bin [Planes] model3.bin model4.bin

Anyway just looking for some advice as I learn how this all works!

image image

wimalopaan commented 3 years ago

Looks reasonable to me. Another idea would be to switch to yaml-format here also?

pfeerick commented 3 years ago

As wimalopaan, YaML would be the way to go for this, although it does obviously mean this would have to wait for YaML to be integrated, so would be post 2.5... which may not be a bad thing to be honest, as we really should be winding up for RCs now and playing wack-a-bug...

I would also lean towards a select few built in basic icons - plane, multirotor, heli, car, boat, submarine? - so that it is baked into firmware if we still have space, and then also user supplied icons from SD as whatever-the-size is PNGs - perhaps simply needing to be the same name as the category to remove need for a selection dialog.... i.e. use custom icon if present, otherwise show default icon, unless a specific icon has been picked.

This is by no means instructions on how it must be done... just adding more ideas ;)

JimB40 commented 3 years ago

We scratched categories in favor of labels. So this should go this way. @raphaelcoeffic ?

pfeerick commented 3 years ago

Ah, yes, thanks for the reminder. Well in that case... how about the following:

pfeerick commented 3 years ago

@dlktdr Is this in state where we could use it basically now, and not worry about the icons and changes to the .ini format, since ideally we'd change over to using labels once .yml is in play (and will also have more flexibility about settings then) - which appear after 2.5 is released.

dlktdr commented 3 years ago

As long as we can get the issue fixed on #714 it was working for me. I haven't had time to look into the reason for that issue yet.

There was a small issue you can't add a new model to a blank page by touching only hardware press, but I think that's a quick fix to pop up the menu if there are no models yet.

I did removed the icons and simplified the screen.

pfeerick commented 3 years ago

Fantastic... Kevin is traveling atm AFAIK but seems to know the keyboard stuff well, so after digging around there for a while, so it should hopefully be a easy fix -i.e. perhaps simply firing the same event as the hardware enter key enter... after all, I don't think there are any multi-line inputs needing a newline?

kevinkoenig commented 3 years ago

I already looked at it quickly. That is what is needed. What I really need is a way to test the change, as I don’t see anyone using that event right now. Can someone give me a branch to pull that I can use to test? And the test case also please

Sent from my iPhone

On Sep 13, 2021, at 8:33 PM, Peter Feerick @.***> wrote:

 Fantastic... Kevin is traveling atm but seems the know the keyboard stuff well, so after digging around there for a while, so it should hopefully be a easy fix -i.e. perhaps simply firing the same event as the hardware enter key enter... after all, I don't there there are any multi-line inputs needing a newline?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dlktdr commented 3 years ago

Very simple test here. in model_setup.cpp

image

The pop-up won't happen on the soft key enter right after you change the models name, only after you touch elsewhere (it looses focus) or use the hardware buttons.

If done with hardware keys and rtn pressed pops up right away. Or if text is changed with the keyboard and press rtn also works.

Thanks @kevinkoenig

kevinkoenig commented 3 years ago

Awesome I will address it quickly.

Sent from Mail for Windows

From: Cliff Sent: Tuesday, September 14, 2021 8:55 AM To: EdgeTX/edgetx Cc: Kevin Koenig; Mention Subject: Re: [EdgeTX/edgetx] Category Editor (#698)

Very simple test here. in model_setup.cpp

The pop-up won't happen on the soft key enter right after you change the models name, only after you touch elsewhere or use the hardware buttons. If done with hardware keys and rtn pressed pops up right away. Or if text is changed with the keyboard and press rtn also works. Thanks @kevinkoenig — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.