Small UI for Devo 7E/10 reference

More
02 Feb 2014 18:26 - 02 Feb 2014 19:49 #19711 by sbstnp
Small UI for Devo 7E/10 reference was created by sbstnp
Hi, attached is a config.ini suitable for activating the small UI on the Devo 10 and 7E. Simply replace media/config.ini with the one attached to activate the smaller UI.

Be aware that only English is tested/supported currently. If your language is latin and has no accented characters then chances are it will work.

The attached .ini used the 04b03 font throughout the UI with some exceptions, like big-boxes where the 14bold default font is used.

4 new keywords made their way in config.ini. Below you'll find some explanations.
  • header_height - this is the header height in pixels
  • header_widget_height - height of buttons displayed on page header, smaller than header_height
  • line_height - text/widget height per line displayed
  • line_space - absolute line space, line_height + spacing

Example, like in the attached config.ini. This would configure the UI for 7 lines, 1 header + 6 lines of content:

header_height = 10
header_widget_height = 8
line_height = 8
line_space = 9

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Attachments:
Last edit: 02 Feb 2014 19:49 by sbstnp.

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

More
24 Feb 2014 18:41 #20835 by WheresWaldo
Replied by WheresWaldo on topic Small UI for Devo 7E/10 reference
Just saw your mod for no boxes on the telemetry pages, also saw you use:
font->style = LABEL_LEFT
Is there a:
font->style = LABEL_RIGHT

One thing I noticed, if you are using DSM? in the emulator Telemetry data is not simulated, didn't know if it's always been this way since I never noticed it before.

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

More
24 Feb 2014 19:02 #20836 by sbstnp
Replied by sbstnp on topic Small UI for Devo 7E/10 reference

WheresWaldo wrote: Just saw your mod for no boxes on the telemetry pages, also saw you use:

font->style = LABEL_LEFT
Is there a:
font->style = LABEL_RIGHT

One thing I noticed, if you are using DSM? in the emulator Telemetry data is not simulated, didn't know if it's always been this way since I never noticed it before.


No there isn't yet, it will be.

No idea about second point.

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

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

More
25 Feb 2014 14:38 #20862 by WheresWaldo
Replied by WheresWaldo on topic Small UI for Devo 7E/10 reference
sbstnp, if you would be so kind as to show me a thing or two, I would like to learn a bit about the code and why certain things are the way they are.

I look at this code snippet from telemtest_page.c
const struct telem_layout devo_layout_basic[] = {
    {TYPE_INDEX | 0,  0, 8,  1},
    {TYPE_VALUE | 0,  8, 35, TELEM_DEVO_TEMP1},
    {TYPE_VALUE | 0, 48, 35, TELEM_DEVO_VOLT1},
    {TYPE_VALUE | 0, 87, 35, TELEM_DEVO_RPM1},
    {TYPE_INDEX | 1,  0, 8,  2},
    {TYPE_VALUE | 1,  8, 35, TELEM_DEVO_TEMP2},
    {TYPE_VALUE | 1, 48, 35, TELEM_DEVO_VOLT2},
    {TYPE_VALUE | 1, 87, 35, TELEM_DEVO_RPM2},
    {TYPE_INDEX | 2,  0, 8,  3},
    {TYPE_VALUE | 2,  8, 35, TELEM_DEVO_TEMP3},
    {TYPE_VALUE | 2, 48, 35, TELEM_DEVO_VOLT3},
    {TYPE_INDEX | 3,  0, 8,  4},
    {TYPE_VALUE | 3,  8, 35, TELEM_DEVO_TEMP4},
    {0, 0, 0, 0},
};
I think I understand what the values mean, the first numeral is line number the second is position the third is pixels wide and the fourth is the source of the value.

Now I look at this code snippet:
const struct telem_layout devo_layout_gps[] = {
    {TYPE_LABEL  | 0,  0, 0,  TELEM_GPS_LAT},
    {TYPE_VALUE2 | 0, 0, LCD_WIDTH - ARROW_WIDTH - 3, TELEM_GPS_LAT},
    {TYPE_LABEL3 | 0, 0, 0,  TELEM_GPS_LONG},
    {TYPE_VALUE4 | 0, 0, LCD_WIDTH - ARROW_WIDTH - 3, TELEM_GPS_LONG},
    {TYPE_LABEL  | 1,  0, 0,  TELEM_GPS_ALT},
    {TYPE_VALUE2 | 1, 0, LCD_WIDTH - ARROW_WIDTH - 3, TELEM_GPS_ALT},
    {TYPE_LABEL3 | 1, 0, 0,  TELEM_GPS_SPEED},
    {TYPE_VALUE4 | 1, 0, LCD_WIDTH - ARROW_WIDTH - 3, TELEM_GPS_SPEED},
    {TYPE_LABEL  | 2,  0, 0,  TELEM_GPS_TIME},
    {TYPE_VALUE2 | 2, 0, LCD_WIDTH - ARROW_WIDTH - 3, TELEM_GPS_TIME},
    {0, 0, 0, 0},
};
To me they look the same, using the same format but I don't understand why this is on three pages and the previous is all on one. I was looking for differences like ';' instead of ',' but I just don't see it. I am not trying to learn C to be a programmer so much, just to better understand the code that is there.

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

Time to create page: 0.035 seconds
Powered by Kunena Forum