[Xastir] what is the color code for attached devices?

Tom Russo russo at bogodyn.org
Thu Dec 7 16:02:12 PST 2017


On Thu, Dec 07, 2017 at 04:30:55PM -0700, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> On Thu, Dec 07, 2017 at 11:14:56PM +0000, we recorded a bogon-computron collision of the <ksaves2 at sbcglobal.net> flavor, containing:
> > 
> > Question:?? What is the color coding in the lower right corner for attached devices?
> > I realize the two green bars mean the port is attached and the middle flashing bar means it's active butwhat does a blue bar mean??? Is it an indication that a device port has been designated and is not active?
> 
> There are three rows:  lower row are green if the interface is enabled, middle
> row flashing shows when data is coming or going on the interface.   Top
> row indicates interface type by color coding.
> 
> Blue are serial TNCs (KISS or otherwise).  Yellow are network connections
> (APRS-IS or other Xastir instances, frex).  Reddish/Orangish are weather
> station connections. 
> 
> I'm sure there are other colors, as there are other interface types, but
> these are the only interface types I have, and so are the only colors I 
> see right now.
> 
> The code that paints these things isn't something I can locate quickly to see
> how it works.  Perhaps Curt knows where it is and can give a more definitive
> list of color/type mappings.

It wasn't easy to find, and the code is somewhat obfuscated.  

In src/interface_gui.c, down around line 9052, there's a block of code
that sets a char variable called "s" to some value depending on what sort of 
device an interface is.  (Aside:  single-letter variables make life so much
fun when trying to find where they're used...)  Down around line 9136, this 
variable is used in a call to "symbol" from src/draw_symbols.c.  This selects 
a symbol from the symbols.dat file from the "~" table (not a normal APRS 
symbol table) for the device.  In order to figure out what color corresponds 
to what device type, you have to read symbols/symbols.dat.  Which is really 
not easy.  That file describes, pixel by pixel, in ASCII characters, how to 
display an icon.  In order to decode the pixel colors, you have to look at
the function read_symbol_from_file in src/draw_symbols.c, to see what color
corresponds to what letter in the symbol.  

Most of the symbols for interfaces are just blocks of color in a particular 
shape, with the exception of DEVICE_SQL_DATABASE, which is a different shape 
and is not a solid block of color, but rather, speckles of different shades of 
blue, I think, maybe.

But if you work it through, it's like this:

  DEVICE_SERIAL_TNC:          #00008B  blue4
  DEVICE_SERIAL_TNC_HSP_GPS:  #00BFFF  Deep sky blue
  DEVICE_SERIAL_GPS:          #0000CD  mediumblue

  DEVICE_SERIAL_WX  or
  DEVICE_NET_WX:              #CD6500  darkorange2

  DEVICE_SQL_DATABASE:        (a mishmosh of blue speckling, can't tell)

  DEVICE_NET_DATABASE or DEVICE_NET_STREAM or 
  DEVICE_NET_AGWPE:           #FFFF00  yellow

  DEVICE_AX25_TNC or  DEVICE_SERIAL_KISS_TNC or
  DEVICE_SERIAL_MKISS_TNC:    #0000CD  mediumblue

  DEVICE_NET_GPSD:            #00CD00  green3
  DEVICE_SERIAL_TNC_AUX_GPS:  #EE0000  red2

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]


More information about the Xastir mailing list