diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-08-31 21:06:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-08-31 21:06:18 +0000 |
commit | 67dc3f7fa26d7d1c664eca372d53f89ea7394d8d (patch) | |
tree | 8a4cde5d15bef82f74aca0423e3567fd602e6571 /gpscap.py | |
parent | 3db1fa2d2caf268359a4486f600b6a460da95c6d (diff) | |
download | gpsd-67dc3f7fa26d7d1c664eca372d53f89ea7394d8d.tar.gz |
Add a hotplug icon to the capability chart.
Diffstat (limited to 'gpscap.py')
-rw-r--r-- | gpscap.py | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1,6 +1,6 @@ """ -gpscap - GPS capability dictionary class. +gpscap - GPS/AIS capability dictionary class. """ import ConfigParser @@ -67,6 +67,7 @@ class GPSDictionary(ConfigParser.RawConfigParser): </tr> """ vhead = "<tr><td style='text-align:center;' colspan='7'><a href='%s'>%s</a></td></tr>\n" + hotpluggables = ("pl2303", "CP2101") ofp.write(thead % (len(self.devices), len(self.vendors))) for vendor in self.vendors: ofp.write(vhead % (self.get(vendor, "vendor_site"), vendor)) @@ -114,15 +115,17 @@ class GPSDictionary(ConfigParser.RawConfigParser): if self.has_option(dev, "noconfigure"): testfield += "<img title='Requires -b option' src='noconfigure.png'>" if self.get(dev, "status") == "excellent": - testfield += "<img src='star.png'><img src='star.png'><img src='star.png'><img src='star.png'>" + testfield += "<img src='star.png'/><img src='star.png'/><img src='star.png'/><img src='star.png'/>" elif self.get(dev, "status") == "good": - testfield += "<img src='star.png'><img src='star.png'><img src='star.png'>" + testfield += "<img src='star.png'/><img src='star.png/'><img src='star.png'/>" elif self.get(dev, "status") == "fair": - testfield += "<img src='star.png'><img src='star.png'>" + testfield += "<img src='star.png'/><img src='star.png'/>" elif self.get(dev, "status") == "poor": - testfield += "<img src='star.png'>" + testfield += "<img src='star.png'/>" elif self.get(dev, "status") == "broken": - testfield += "<img title='Device is broken' src='bomb.png'>" + testfield += "<img title='Device is broken' src='bomb.png'/>" + if self.has_option(dev, "usbchip") and self.get(dev, "usbchip") in hotpluggables: + testfield += "<img src='hotplug.png'/>" ofp.write("<td>%s</td>\n" % testfield) nmea = " " if self.has_option(dev, "nmea"): |