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

Flat Theme Icons #1193

Merged

Conversation

hooperfly
Copy link
Contributor

Add a new set of icons for use with the GCS. The current classic icons are sometimes difficult to see against a black GCS screen(i.e. papgets). The new flat theme hopefully improves readability and adds some new icons related to rotorcraft usage vs. fixed wing.

The new flat theme icons are localized in their own directory named flat_theme in $PAPARAZZI_HOME/data/pictures/gcs_icons. Along with a new set of icons, this directory contains the master GIMP file named flat_theme.xcf.

Reference pull request #1187 for historical background.

@gautierhattenberger
Copy link
Member

I think we can merge this, since it my interest other people. They will not be able to switch from one theme to an other easily, but I'll try to find some time to do something in this direction later.
Is this okay for you ?

@hooperfly
Copy link
Contributor Author

Currently, the GCS derives it's icons location from the gcs_icons_path variable set in $PAPARAZZI_HOME/sw/lib/ocaml/env.ml

let gcs_icons_path = paparazzi_home // "data" // "pictures" // "gcs_icons"

The setting of this environment variable could be exposed in an XML template. For example, the gcs_icons_path could be set via the aircraft configuration xml file.

Something like:

  <section name="GCS">
    <define name="ICONS_THEME" value="flat_theme">
    <define name="ALT_SHIFT_PLUS_PLUS" value="30"/>
    <define name="ALT_SHIFT_PLUS" value="5"/>
    <define name="ALT_SHIFT_MINUS" value="-5"/>
    <define name="SPEECH_NAME" value="Teensy Fly Hexa"/>
    <define name="AC_ICON" value="hexarotor_x"/>
  </section>

@gautierhattenberger
Copy link
Member

can you try the gcs_icons_flat_theme from paparazzi repo ?
https://github.com/paparazzi/paparazzi/tree/gcs_icons_flat_theme

@hooperfly
Copy link
Contributor Author

Added the ICONS_THEME attribute to each aircraft files:

  <section name="GCS">
    <define name="ICONS_THEME" value="flat_theme">
    ......
  </section>

and it seems to work fine. Here's the GCS with the patch:
screen shot 2015-06-02 at 4 42 36 pm

@hooperfly
Copy link
Contributor Author

I also tested the flat_theme with the MicroJet. They seem reasonable.

screen shot 2015-06-02 at 4 54 17 pm

@hooperfly
Copy link
Contributor Author

More tests:

  1. Invalid value given to the ICONS_THEME attribute

<define name="ICONS_THEME" value="nothing_theme"/>

The GCS used the default icons as expected.

  1. Relative path given to the ICONS_THEME attribute

<define name="ICONS_THEME" value="../../../myawesome_theme"/>

The GCS successfully loaded and used the appropriate icons in myawesome_theme

@hooperfly
Copy link
Contributor Author

Updated the wiki with related documentation:

http://wiki.paparazziuav.org/wiki/Airframe_Configuration#GCS

@gautierhattenberger gautierhattenberger merged commit 9c24138 into paparazzi:master Jun 3, 2015
@hooperfly hooperfly deleted the gcs_icons_flat_theme branch June 3, 2015 16:50
@flixr flixr added this to the v5.6 milestone Jun 6, 2015
@flixr flixr added the GCS label Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants