Devo 10/7E small UI (updated 1st post)

More
27 Dec 2013 20:37 #17148 by sbstnp
Observations noted. Thanks guys.

Now I'm at mixer and while I have a picture in my head, I'm also trying to migrate the thing to GUI_Scrollable (which is smart btw) and my head is spinning already hehe. Need to read some more code to fully understand all those callbacks.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
27 Dec 2013 21:04 #17150 by PhracturedBlue
Replied by PhracturedBlue on topic WIP / Devo 10 (eventually 7e) condensed GUI.
I should really try to document the API (maybe via doxygen or something). Especially for the GUI, which is rather complicated with all its callbacks.

The scrollable is a really powerful widget, but you need to take special care that the getobj_cb understands what is going on., otherwsie scrolling will not be intuitive.

If you have any questions on how it works, let me know.

Please Log in or Create an account to join the conversation.

More
27 Dec 2013 21:36 #17156 by sbstnp
Thanks, I certainly will if I don't get it by tomorrow.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 02:53 - 28 Dec 2013 02:55 #17247 by PhracturedBlue
Replied by PhracturedBlue on topic WIP / Devo 10 (eventually 7e) condensed GUI.
I was thinking about changing the TxPower and battery to use the micro font on the devo10/7e. The font allows these strings to take a lot less space. I need to hard-code the font used for these widgets though, so a change is something that I'd like some opinion on.
Here is what the font looks like (note the placement of the widgets is now user editable)


or
Attachments:
Last edit: 28 Dec 2013 02:55 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 08:28 #17258 by HappyHarry
Replied by HappyHarry on topic WIP / Devo 10 (eventually 7e) condensed GUI.
that looks good imo

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 08:50 #17260 by Daryoon
Replied by Daryoon on topic WIP / Devo 10 (eventually 7e) condensed GUI.
I agree. I like the second image. And if it saves space as well...then it's a win win.

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 09:32 #17263 by sbstnp
Ok so I got the mixer mostly working and on GUI_Scrollable. What I still don't get, yet, is how to save the current selected position between main mixer page, limit page and mixer edit page.


Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 10:46 #17266 by SeByDocKy
Replied by SeByDocKy on topic WIP / Devo 10 (eventually 7e) condensed GUI.
I just installed the 28/12 Night Build for my 7E and TX voltage and emmission power disspeared from main screen. Is-it normal ?

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 10:58 #17268 by sbstnp

SeByDocKy wrote: I just installed the 28/12 Night Build for my 7E and TX voltage and emmission power disspeared from main screen. Is-it normal ?


Probably you need to add them back.

Oh, and please don't turn this topic into a bug report.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 13:22 #17278 by RandMental
Replied by RandMental on topic WIP / Devo 10 (eventually 7e) condensed GUI.
Correct, you need to add them to the mains screen config as you would do with all you other mains screen items

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 13:34 #17281 by kreidler

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 13:59 #17283 by sbstnp
Guys, please I'd appreciate if you don't turn this thread into a mess. Bug reports on bitbucket, etc.

Please and thanks!

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 14:45 #17288 by PhracturedBlue
Replied by PhracturedBlue on topic WIP / Devo 10 (eventually 7e) condensed GUI.

sbstnp wrote: Ok so I got the mixer mostly working and on GUI_Scrollable. What I still don't get, yet, is how to save the current selected position between main mixer page, limit page and mixer edit page.

Normally you would do:
GUI_SetSelected(GUI_ShowScrollableRowOffset(&gui->scrollable, current_selected));
to restore the position and use:
current_selected = GUI_ScrollableGetObjRowOffset(&gui->scrollable, GUI_GetSelected());
to save position.
We only currently save the position on the main mixer page. The limit and editor pages always reset.

However, I never converted the mixer page to use Scrollabele. If I recall it is because the Scrollable was too buggy when I tried it the 1st time, and I had difficulty getting the scrolling to work in a predictable way. These days I'd expect it to be pretty easy to convert.
If you look at the trim_page code, you'll see how we do this.

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 17:52 - 28 Dec 2013 17:53 #17318 by sbstnp
Got it working thanks, needed to hook PAGE_MixerExit too.

But, to save position when entering limit and template callbacks I had to call the same code. Is this the right way? MIXER_PageExit doesn't seem to get called when the callback fires.

Or above when saying the limit and editor page always reset did you meant I should save main mixer page position when entering those pages?

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Last edit: 28 Dec 2013 17:53 by sbstnp.

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 19:19 #17325 by PhracturedBlue
Replied by PhracturedBlue on topic WIP / Devo 10 (eventually 7e) condensed GUI.
yes you need to manually save the position (calling PageExit is probably a fine way to do so) when entering the limit or edit pages since it won' get called for you.

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 21:55 #17349 by sbstnp
Ok, so I think I have everything working except the standard mixer. Since it's almost 12AM I will leave it for tomorrow. I still need to brush over the telemetry monitor page but it's kinda complex and will need some effort to understand.

Now I need to:

1. Decide how to enable this
- simple config.ini switch
- from font definition (this is tricky cause we have all sorts of fonts)
2. Get rid of all the #defines
3. Define some bounds, like all fonts must be larger than 6 pixels and smaller than some value.

Anyway, I haven't given this much thought but I will play with it tomorrow and see what the options are.

Some more pix:

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 22:20 #17356 by PhracturedBlue
Replied by PhracturedBlue on topic WIP / Devo 10 (eventually 7e) condensed GUI.
It is looking good. Before going too far down the integration path, I'd like to see what you have.
I definitely do not want a bunch of 'if' conditions all over the code. Ideally we can set it up so that a few variables are changed that affect the layout positioning, but I really need to see how your code works to have any idea about that.

Please Log in or Create an account to join the conversation.

More
28 Dec 2013 22:30 #17358 by sbstnp
Replied by sbstnp on topic Devo 10/7E small UI (work in progress)
Haven't got that far yet, will tackle that tomorrow. All the code is still using #defines atm, I just went through and tried to make sense of it and fix assumptions.

To be honest I'm certain your scrollable widget will make this job fairly easy. We just need to have 2 regions:

1. Header
2. Content handled by scrollable.
3. Row and Size callbacks.

Obviously not that easy but you get the idea.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

More
29 Dec 2013 04:46 #17376 by PhracturedBlue
Replied by PhracturedBlue on topic Devo 10/7E small UI (work in progress)
FYI, to get longer strings without modifying the code, there is a trick you can use. You can create an 'English' translation that translates the short strings into longer ones. where necessary. You only need to modify the strings you like, as all the rest will default to the current short strings. This won't work on the Devo7e though.

Please Log in or Create an account to join the conversation.

More
29 Dec 2013 15:26 #17403 by sbstnp
Replied by sbstnp on topic Devo 10/7E small UI (work in progress)
Yes I know, and I'll have a language file prepared just for that :)

What place would be appropriate for defining global object containing fonts metrics and other UI info? gui.c & h? I'm thinking along the lines of determining on startup fonts characteristics and optimal spacing then saving those in struct and using it all over the place.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire

Please Log in or Create an account to join the conversation.

Time to create page: 0.148 seconds
Powered by Kunena Forum